Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Esteemed and hallowed Monks:
Trying to force upper case on Moose args taken from command line - eg FX currency codes - e.g.
Yes - I could put it into the calling code - but how would I get Moose to force it itself - I tried this from Moose docs:$lookup usd eur gbp chf
but I get message that I am unable to to modify read-only value despite Moose docs saying that trigger can modify RO values. What is correct way to force upper case (and thus in general) 'pre-preocess' object constructor arguments? Thank-you.trigger => sub { $_[0]->code( uc( $_[0]->code ) );
Back to
Seekers of Perl Wisdom