In perl.git, the branch blead has been updated <http://perl5.git.perl.org/perl.git/commitdiff/f0ba2695eaf69c89c55a53bd75472a7b1d2aa436?hp=9bd30c63d934b70cf98e71983670d3e837ec38bb>
- Log ----------------------------------------------------------------- commit f0ba2695eaf69c89c55a53bd75472a7b1d2aa436 Author: Tony Cook <[email protected]> Date: Wed Jul 23 13:51:30 2014 +1000 Chad Granum is now a perl author M AUTHORS commit 2572a88967feec18b0821c36fcf89813c01cf742 Author: Chad Granum <[email protected]> Date: Tue Jul 15 23:10:37 2014 -0700 Fix ok() that should be a like() M dist/autouse/t/autouse.t commit 49397f68b6cdcf8815424873504e4252773afdef Author: Chad Granum <[email protected]> Date: Tue Jul 15 23:10:20 2014 -0700 Delay loading Test::More M dist/autouse/t/autouse.t ----------------------------------------------------------------------- Summary of changes: AUTHORS | 1 + dist/autouse/t/autouse.t | 12 ++++++++---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/AUTHORS b/AUTHORS index 177e64d..5cdc486 100644 --- a/AUTHORS +++ b/AUTHORS @@ -197,6 +197,7 @@ Cary D. Renzema <[email protected]> Casey R. Tweten <[email protected]> Casey West <[email protected]> Castor Fu +Chad Granum <[email protected]> Chaim Frenkel <[email protected]> Charles Bailey <[email protected]> Charles F. Randall <[email protected]> diff --git a/dist/autouse/t/autouse.t b/dist/autouse/t/autouse.t index 0a51ee0..74cad59 100644 --- a/dist/autouse/t/autouse.t +++ b/dist/autouse/t/autouse.t @@ -8,23 +8,27 @@ BEGIN { } } -use Test::More tests => 15; - +my ($ok1, $ok2); BEGIN { require autouse; eval { "autouse"->import('Scalar::Util' => 'Scalar::Util::set_prototype(&$)'); }; - ok( !$@, "Function from package with custom 'import()' correctly imported" ); + $ok1 = !$@; eval { "autouse"->import('Scalar::Util' => 'Foo::min'); }; - ok( $@, qr/^autouse into different package attempted/ ); + $ok2 = $@; "autouse"->import('Scalar::Util' => qw(isdual set_prototype(&$))); } +use Test::More tests => 15; + +ok( $ok1, "Function from package with custom 'import()' correctly imported" ); +like( $ok2, qr/^autouse into different package attempted/, "Catch autouse into different package" ); + ok( isdual($!), "Function imported via 'autouse' performs as expected"); -- Perl5 Master Repository
