Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: RFC extending Benchmark.pm to facilitate CODEHASHREF

by tobyink (Abbot)
on Nov 26, 2013 at 08:54 UTC ( #1064369=note: print w/ replies, xml ) Need Help??


in reply to RFC extending Benchmark.pm to facilitate CODEHASHREF

use Attribute::Benchmark; sub name1 :Benchmark { ... } sub name2 :Benchmark { ... }

That is all.

use Moops; class Cow :rw { has name => (default => 'Ermintrude') }; say Cow->new->name


Comment on Re: RFC extending Benchmark.pm to facilitate CODEHASHREF
Download Code
Re^2: RFC extending Benchmark.pm to facilitate CODEHASHREF
by LanX (Canon) on Nov 26, 2013 at 13:30 UTC
    So you liked the attribute idea? :)

    Attribute-Benchmark ===================  Created:      2013-11-26

    "Publish or perish"? ;)

    Cheers Rolf

    ( addicted to the Perl Programming Language)

      To be honest, I can't remember reading that paragraph in your OP, though I may have skimmed it and absorbed it subconsciously.

      I was also thinking along the lines of Test::Class::MOP's is testcase trait and how mop's method traits are basically a variation on sub attributes.

      use Moops; class Cow :rw { has name => (default => 'Ermintrude') }; say Cow->new->name

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1064369]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (5)
As of 2014-09-15 03:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite cookbook is:










    Results (145 votes), past polls