Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling

Re^2: MooseX-Types warnings

by j1n3l0 (Friar)
on Oct 02, 2010 at 20:17 UTC ( #863105=note: print w/replies, xml ) Need Help??

in reply to Re: MooseX-Types warnings
in thread MooseX-Types warnings


Thanks for that but that's the change I make that ends up with the error:

Can't call method "is_a_type_of" on an undefined value at /Users/io1/p +erl5/perlbrew/perls/p512/l\ ib/site_perl/5.12.0/darwin-thread-multi-2level/Moose/Meta/Attribute/Na +tive/ line 62.

Smoothie, smoothie, hundre prosent naturlig!

Replies are listed 'Best First'.
Re^3: MooseX-Types warnings
by phaylon (Curate) on Oct 04, 2010 at 21:00 UTC

    You're using "DataFromFile" as type in your attribute declaration. You should specify it without the quotes, since your type library will export those as symbols.

    You have a comment there saying "won't compile without the quotes," but that should work if you're using commata instead of the arrow.

    Also, you don't need to check that your subclass of ArrayRef is an array reference, the Moose type system will do that.

    Ordinary morality is for ordinary people. -- Aleister Crowley
      Thanks for your insight.

      I've discovered the root of my problem was a typo in package Foo:

      package Foo; ... use MyDemoTypes "DataFromFile"; # should be MyTypes "DataFromFile" ...
      All works now (with your suggestions). I knew it would turn out to be something trivial. Thanks again :)

      Smoothie, smoothie, hundre prosent naturlig!

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://863105]
[Corion]: I stay home today as preventative measure to not really get a cold. On the upside, I can sit on the balcony in the sun, and it isn't that cold, at least once I don a thick coat :)

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (5)
As of 2018-03-21 11:04 GMT
Find Nodes?
    Voting Booth?
    When I think of a mole I think of:

    Results (267 votes). Check out past polls.