|
|
| No such thing as a small change | |
| PerlMonks |
Re: Perl/Moose calling writer doesnt workby 1nickt (Canon) |
| on Mar 10, 2018 at 13:24 UTC ( [id://1210619]=note: print w/replies, xml ) | Need Help?? |
|
I concur with haukex that you should make a SSCCE to demonstrate/research your issue. Something very simple like: This will show you the error clearly. Output:
As you can see this is not what specifying a custom writer does. As far as I understand it, specifying a custom writer property for an attribute simply changes the name of the writer from the default. Output:
For what you are doing your code should use a custom type check, or a coercion, or a trigger instead. Output:
Hope this helps!
The way forward always starts with a minimal test.
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||||||||||||||||