Created
December 27, 2010 20:29
-
-
Save berekuk/756524 to your computer and use it in GitHub Desktop.
MX::Types caveat
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 Framework::Query; | |
use Moose; | |
has str => (is => "ro", required => 1); | |
package Framework::Types; | |
use MooseX::Types -declare => [qw( Query )]; | |
class_type Query, { class => "Framework::Query" }; | |
package Framework; | |
BEGIN { | |
# this could be simply 'use Framework::Types qw(:all)' if Framework::Types is in separate file | |
Framework::Types->import(qw(:all)); | |
} | |
Framework::Query->new(str => 5); |
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
Argument cannot be 'str' at /usr/share/perl5/MooseX/Types/TypeDecorator.pm line 82 | |
MooseX::Types::TypeDecorator::new('MooseX::Types::TypeDecorator=HASH(0xeedd98)', 'str', 5) called at - line 15 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment