« Communicating Value: This is Our World and Perl is My Choice! | Main | App::local::lib::helper - early access announcement »

08/03/2010

Comments

Feed You can follow this conversation by subscribing to the comment feed for this post.

zby

Just one clarification - in the examples above:

return $p-prefix .":". $self-$orig($string);

is later in the MooseX::Declare version transformed into:

return $self-$orig("$prefix: $string");

does that mean that theMooseX::Declare peeks into the parameter and parses it to remove$prefix: and them attach it to the output of$self-$orig($string); ?

John Napiorkowski

Hey,Good catch! I'll update on Github shortly. The two returns do indeed function slightly different. The first one: return $p-prefix .":". $self-$orig($string);Calls the original method with the original arguments ($string), pre-pends the prefix and then returns the lot. return $self-$orig("$prefix: $string");Sends a modified argument to the original method and then returns that. Whether they return the same value or not will depend on the what the underlying function does.Thanks! I'll fix it up shortly.

Danzel

The blog looks good. Maybe improving the website design will make it look more professional and earn you more followers. Keep up the good work!

The comments to this entry are closed.