Created
July 1, 2011 13:41
-
-
Save berekuk/1058561 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| $ perl test.pl | |
| 'R2' requires the method 'foo' to be implemented by 'X' at /usr/lib/perl5/Moose/Meta/Role/Application.pm line 53 | |
| Moose::Meta::Role::Application::apply('Moose::Meta::Role::Application::ToClass=HASH(0x11888f0)', 'Moose::Meta::Role=HASH(0x1176310)', 'Moose::Meta::Class=HASH(0x1176300)') called at /usr/lib/perl5/Moose/Meta/Role/Application/ToClass.pm line 33 | |
| Moose::Meta::Role::Application::ToClass::apply('Moose::Meta::Role::Application::ToClass=HASH(0x11888f0)', 'Moose::Meta::Role=HASH(0x1176310)', 'Moose::Meta::Class=HASH(0x1176300)', 'HASH(0x117ca00)') called at /usr/lib/perl5/Moose/Meta/Role.pm line 490 | |
| Moose::Meta::Role::apply('Moose::Meta::Role=HASH(0x1176310)', 'Moose::Meta::Class=HASH(0x1176300)') called at /usr/lib/perl5/Moose/Util.pm line 139 | |
| Moose::Util::_apply_all_roles('Moose::Meta::Class=HASH(0x1176300)', 'undef', 'R2') called at /usr/lib/perl5/Moose/Util.pm line 93 | |
| Moose::Util::apply_all_roles('Moose::Meta::Class=HASH(0x1176300)', 'R2') called at /usr/lib/perl5/Moose.pm line 60 | |
| Moose::with('Moose::Meta::Class=HASH(0x1176300)', 'R2') called at /usr/lib/perl5/Moose/Exporter.pm line 365 | |
| Moose::with('R2') called at test.pl line 17 |
This file contains hidden or 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
| #!/usr/bin/perl | |
| package R; | |
| use Moose::Role; | |
| requires "foo"; | |
| package R2; | |
| use Moose::Role; | |
| with "R", { -excludes => "foo" }; | |
| has "foo" => (is => "ro"); | |
| package X; | |
| use Moose; | |
| with "R2"; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment