Skip to content

Instantly share code, notes, and snippets.

@lestrrat
Created May 17, 2009 16:52
Show Gist options
  • Save lestrrat/113054 to your computer and use it in GitHub Desktop.
Save lestrrat/113054 to your computer and use it in GitHub Desktop.
package Role1;
use Moose::Role;
has 'foo';
package Role2;
use Moose::Role;
with 'Role1';
has foo => (is => 'ro', isa => 'Int');
package Role3;
use Moose::Role;
with 'Role2';
has foo => (is => 'ro', isa => 'HashRef');
package FooBar;
use Moose;
with 'Role3';
package main;
FooBar->new(foo => {});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment