Skip Menu |

Preferred bug tracker

Please email the preferred bug tracker to report your issue.

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the autouse CPAN distribution.

Report information
The Basics
Id: 65247
Status: new
Priority: 0/
Queue: autouse

People
Owner: Nobody in particular
Requestors: mschwern [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 1.06
Fixed in: (no value)



Subject: Typo in test
t/autouse.t has ok( $@, qr/^autouse into different package attempted/ ); when it likely means like( $@, qr/^autouse into different package attempted/ ); The attached patch fixes that and also has better and more direct checking of the evals.
Subject: test.patch
diff --git a/t/autouse.t b/t/autouse.t index 53e1740..52561f6 100644 --- a/t/autouse.t +++ b/t/autouse.t @@ -8,19 +8,21 @@ BEGIN { } } -use Test::More tests => 12; +use Test::More tests => 14; BEGIN { require autouse; - eval { + ok eval { "autouse"->import('List::Util' => 'List::Util::first(&@)'); + 1; }; - ok( !$@ ); + is( $@, "" ); - eval { + ok !eval { "autouse"->import('List::Util' => 'Foo::min'); + 1; }; - ok( $@, qr/^autouse into different package attempted/ ); + like( $@, qr/^autouse into different package attempted/ ); "autouse"->import('List::Util' => qw(max first(&@))); }