diff options
author | Michael G. Schwern <schwern@pobox.com> | 2005-06-28 08:58:36 -0700 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2005-07-01 12:32:21 +0000 |
commit | 57ddaf2acd83324bde010fedf6d86f70fe4ec09e (patch) | |
tree | 7867dd62c13bc8dfd9a7cb1b4898057ec8b745ad | |
parent | b094c71d0e5fe8bc361ad2e51a050cd90827d764 (diff) | |
download | perl-57ddaf2acd83324bde010fedf6d86f70fe4ec09e.tar.gz |
Make Exporter.t warnings clean
Message-ID: <20050628225836.GB27320@windhund.schwern.org>
p4raw-id: //depot/perl@25036
-rw-r--r-- | lib/Exporter.t | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/lib/Exporter.t b/lib/Exporter.t index 01c7891da8..c90a4608d9 100644 --- a/lib/Exporter.t +++ b/lib/Exporter.t @@ -1,4 +1,4 @@ -#!./perl +#!./perl -w BEGIN { chdir 't' if -d 't'; @@ -102,7 +102,7 @@ my $got = eval {&lifejacket}; # Testing->import is called. ::ok( eval "defined &is", "Import a subroutine where exporter must create the typeglob" ); -my $got = eval "&is"; +$got = eval "&is"; ::ok ( $@ eq "", 'check we can call the imported autoloaded subroutine') or chomp ($@), print STDERR "# \$\@ is $@\n"; ::ok ( $got eq 'Is', 'and that it gave the correct result') @@ -182,20 +182,20 @@ package Moving::Target; @ISA = qw(Exporter); @EXPORT_OK = qw (foo); -sub foo {"foo"}; -sub bar {"bar"}; +sub foo {"This is foo"}; +sub bar {"This is bar"}; package Moving::Target::Test; -Moving::Target->import (foo); +Moving::Target->import ('foo'); -::ok (foo eq "foo", "imported foo before EXPORT_OK changed"); +::ok (foo() eq "This is foo", "imported foo before EXPORT_OK changed"); push @Moving::Target::EXPORT_OK, 'bar'; -Moving::Target->import (bar); +Moving::Target->import ('bar'); -::ok (bar eq "bar", "imported bar after EXPORT_OK changed"); +::ok (bar() eq "This is bar", "imported bar after EXPORT_OK changed"); package The::Import; |