Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
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
Replies are listed 'Best First'.
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 having an uproarious good time at the Monastery: (14)
As of 2015-07-07 20:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (93 votes), past polls