Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Perlito5 - tests - add AUTOLOAD tests
  • Loading branch information
fglock committed Nov 21, 2012
1 parent 131944d commit 98415bf
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions t5/01-perlito/31-autoload.t
@@ -0,0 +1,26 @@
use feature 'say';
use strict;

say "1..3";

{
package A;

our $AUTOLOAD;

sub AUTOLOAD {
say "# A::AUTOLOAD @_";
print "not " if $_[0] != 123;
say "ok 1";
say "# $AUTOLOAD";
print "not " if $AUTOLOAD ne "A::a";
say "ok 2";
return 456;
}

my $v = a(123);
print "not " if $v != 456;
say "ok 3";
}


0 comments on commit 98415bf

Please sign in to comment.