Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re: RFC extending Benchmark.pm to facilitate CODEHASHREF

by tobyink (Canon)
on Nov 26, 2013 at 08:54 UTC ( [id://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

Replies are listed 'Best First'.
Re^2: RFC extending Benchmark.pm to facilitate CODEHASHREF
by LanX (Saint) 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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1064369]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (5)
As of 2024-03-19 11:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found