Created
September 9, 2011 17:09
-
-
Save tadzik/1206761 to your computer and use it in GitHub Desktop.
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
┌─[tadzik@yavin4]─[~/src/mo-pm] (master) | |
└─[%]─> cat foo.pl | |
use 5.014; | |
package Foo { | |
use Mo; | |
has 'foo', default => sub { say 'defaulting!'; 5 } | |
} | |
my $a = Foo->new; | |
say $a->foo; | |
$a->foo(undef); | |
say $a->foo; | |
┌─[tadzik@yavin4]─[~/src/mo-pm] (master) | |
└─[%]─> PERL5LIB=lib perl foo.pl | |
defaulting! | |
5 | |
defaulting! | |
5 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment