Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/env perl
    use warnings;
    ...
    package ThatPackage;
    
    sub parse { } # Yep, even empty the error occurs, because it never eve
    +n gets as far as calling it
    
  2. or download this
    #!/usr/bin/env perl -w
    use feature ':5.10';
    ...
    ok( ThatPackage::parse $foo, " this is a test" ); # fine, test doesn't
    + pass but runs fine
    ok( ThatPackage::parse($bar), " this is a test" ); # also fine
    ok( ThatPackage::parse $bar, " this is a test" ); # error here: 'Can't
    + call method "ThatPackage::parse" without a package or object referen
    +ce at unit_test.pl line 43.'