Skip to content

Instantly share code, notes, and snippets.

@jjn1056
Created July 28, 2010 14:22
Show Gist options
  • Save jjn1056/494665 to your computer and use it in GitHub Desktop.
Save jjn1056/494665 to your computer and use it in GitHub Desktop.
## tried
use MooseX::Declare;
class LoggedMethodsParameterizableRole
with HasLogging(target_method=>'my_method')
{
method my_method(Str $name, Int $age) {
return "Hi $name, you are $age years old";
}
}
## also tried
use MooseX::Declare;
class LoggedMethodsParameterizableRole
with HasLogging => {target_method=>'my_method'}
{
method my_method(Str $name, Int $age) {
return "Hi $name, you are $age years old";
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment