Hey all,

I'm very new to Moose, building my first app that uses more than just "has foo => (isa=>'Str', is=>'rw')"-level features.

I am trying to make a property like this:

   has foo => (isa=>'Str', is=>'rw');

in which the property undergoes a transformation more or less like,

   $self->{'foo'} =~ s/\W+/_/gs;

such that this would be true:

   ...
   $obj->foo("one two ?three");
   print $obj->foo, "\n";   ### prints: "one_two_three"

What's the best way to accomplish that? Is that even something appropriately put on Moose? Can someone point me to where to look in the manual or cookbook (I've looked already, but I don't know what I'm looking for, really).

Thanks!

-Sir Robert

Reply via email to