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