Created
October 5, 2011 04:15
-
-
Save notbenh/1263615 to your computer and use it in GitHub Desktop.
are prototypes exportable?
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl | |
use strict; | |
use warnings; | |
use Test::Most qw{no_plan}; | |
BEGIN { | |
package My::Test; | |
use Exporter qw{import}; | |
our @EXPORT = qw{thing}; | |
sub thing ($) { shift }; | |
}; | |
My::Test->import(); | |
can_ok q{main}, qw{ thing }; | |
is thing 'that', 'that'; | |
__END__ | |
String found where operator expected at t.t line 16, near "thing 'that'" | |
(Do you need to predeclare thing?) | |
Not enough arguments for Test::More::is at t.t line 16, near "thing 'that'" | |
syntax error at t.t line 16, near "thing 'that'" | |
Execution of t.t aborted due to compilation errors. | |
# Looks like your test exited with 255 before it could output anything. | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment