#This is an excerpt from the automatically generated module template after running % h2xs -A -X -n Integer::Doubler package Integer::Doubler; use 5.010000; use strict; use warnings; require Exporter; our @ISA = qw(Exporter); our %EXPORT_TAGS = ( 'all' => [ qw( ) ] ); our @EXPORT_OK = ( @{ $EXPORT_TAGS{'all'} } ); our @EXPORT = qw( ); our $VERSION = '0.01'; sub doubler { return 2 * shift; # I declared this sub } 1; #### #Here is test file generated and what I added to it (Only Last Line): # Before `make install' is performed this script should be runnable with # `make test'. After `make install' it should work as `perl Integer-Doubler.t' ######################### # change 'tests => 1' to 'tests => last_test_to_print'; use Test::More tests => 1; BEGIN { use_ok('Integer::Doubler') }; ######################### # Insert your test code below, the Test::More module is use()ed here so read # its man page ( perldoc Test::More ) for help writing this test script. print "2 * 2 =", doubler(2); #<------here, line 16 #### "undefined subroutine &main::doubler called at t/Integer-Doubler.t line 16" "#Looks like your test exited with 255 just after 1" Test returned status 255 (wstat 65280, 0xff00) after all the subtests completed successfully Failed Test Stat Wstat Total Fail List of Failed ------------------------------------------------------------------------------- t/Integer-Doubler.t 255 65280 1 0 ?? Failed 1/1 test scripts. 0/1 subtests failed. Files=1, Tests=1, 0 wallclock secs ( 0.00 cusr + 0.00 csys = 0.00 CPU) #### Skip blib\lib\Integer\Doubler.pm (unchanged) C:\Perl\bin\perl.exe "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib\lib', 'blib\arch')" t/*.t t/Integer-Doubler....ok All tests successful. Files=1, Tests=1, 0 wallclock secs ( 0.00 cusr + 0.00 csys = 0.00 CPU) ####