Skip to content

Instantly share code, notes, and snippets.

@throughnothing
Created April 12, 2012 20:33
Show Gist options
  • Save throughnothing/2370789 to your computer and use it in GitHub Desktop.
Save throughnothing/2370789 to your computer and use it in GitHub Desktop.
Moose Package Foolishness
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