Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

25 lines (17 sloc) 0.396 kB
package cm3;
sub new { bless $_[1], $_[0] }
use lib "tests";
# comment/uncomment one or the other:
use Accessor_maker;
# sub foo { $_[0]->{ 'foo' } }
package main;
sub test {
my $self = shift;
print 'un' unless defined $self->foo;
print "defined\n";
my $foo = $self->foo;
print 'un' unless defined $foo;
print "defined\n";
}
test( cm3->new({}) );
test( cm3->new({foo => 1}) );
Jump to Line
Something went wrong with that request. Please try again.