Created
April 12, 2012 20:33
-
-
Save throughnothing/2370789 to your computer and use it in GitHub Desktop.
Moose Package Foolishness
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
package Test; | |
use Moose; | |
has m => ( is => 'rw', default => sub { "Hello, World!" } ); | |
sub run { | |
my $t = Test->new; | |
print $t->m . "\n"; | |
} | |
run unless caller; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment