about summary refs log tree commit
diff options
context:
space:
mode:
authorGraham Barr <gbarr@pobox.com>2010-05-31 10:03:06 -0500
committerGraham Barr <gbarr@pobox.com>2010-05-31 10:15:01 -0500
commit90a4e718ca907b3510536b9e4ea7a0b22299b0e2 (patch)
treeb247074576a57b7fcf9075e45a8d0bdc935d3d8e
parent048c6a3f2c3a59f04fe2f8a81f52783489484720 (diff)
downloadperl-libnet-90a4e718ca907b3510536b9e4ea7a0b22299b0e2.tar.gz
fix netrc tests
-rw-r--r--Net/Netrc.pm4
-rw-r--r--t/netrc.t1
2 files changed, 3 insertions, 2 deletions
diff --git a/Net/Netrc.pm b/Net/Netrc.pm
index c29be79..3f04fee 100644
--- a/Net/Netrc.pm
+++ b/Net/Netrc.pm
@@ -9,7 +9,7 @@ package Net::Netrc;
 use Carp;
 use strict;
 use FileHandle;
-use vars qw($VERSION);
+use vars qw($VERSION $TESTING);
 
 $VERSION = "2.13";
 
@@ -37,7 +37,7 @@ sub _readrc {
       $file = $home . "/_netrc";
     }
     else {
-      return;
+      return unless $TESTING;
     }
   }
 
diff --git a/t/netrc.t b/t/netrc.t
index cb5c35d..2a00956 100644
--- a/t/netrc.t
+++ b/t/netrc.t
@@ -44,6 +44,7 @@ require $libnet_t;
 eval { require Net::Netrc; };
 ok( !$@, 'should be able to require() Net::Netrc safely' );
 ok( exists $INC{'Net/Netrc.pm'}, 'should be able to use Net::Netrc' );
+$Net::Netrc::TESTING=$Net::Netrc::TESTING=1;
 
 SKIP: {
         skip('incompatible stat() handling for OS', 4), next SKIP