Skip to content

Instantly share code, notes, and snippets.

@berekuk
Created May 25, 2012 13:31
Show Gist options
  • Select an option

  • Save berekuk/2788185 to your computer and use it in GitHub Desktop.

Select an option

Save berekuk/2788185 to your computer and use it in GitHub Desktop.
$ perl -E 'package R; use Role::Tiny; sub foo { "R1 foo" }; package R2; use Role::Tiny; sub foo { "R2 foo" }; package X; use Role::Tiny::With; sub new { bless {} }; my $x = X->new; Role::Tiny->apply_roles_to_object($x, "R", "R2"); say $x->foo;'
R2 foo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment