Beefy Boxes and Bandwidth Generously Provided by pair Networks Frank
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re^2: perlcritic and OO Perl (including Moose) idioms

by boftx (Hermit)
on Sep 20, 2013 at 02:46 UTC ( #1054937=note: print w/ replies, xml ) Need Help??


in reply to Re: perlcritic and OO Perl (including Moose) idioms
in thread perlcritic and OO Perl (including Moose) idioms

That was the first thing we did to verify what was being complained about. Yes, that works, but ...

1) we really don't want to replace my $self = shift; in hundreds, if not thousands, of places in our code base.

2) my $self = shift; is what I would consider a very popular idiom that has been in use since (I suspect) many of us first read about OO Perl and how it relates to farm animals. (BTW, where can I find a copy of that very informative original tutorial?)

3) Most importantly, it does nothing to address the following code that allows for rather flexible arg passing (not saying if this is good or bad, just that this concept is pretty standard, too.):

my $self = shift; my %args = @_ == 1 ? ( period => shift ) : @_;

I appreciate the response, but unfortunately that has already been viewed as a less-than-optimal resolution.


Comment on Re^2: perlcritic and OO Perl (including Moose) idioms
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (9)
As of 2014-04-19 10:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (480 votes), past polls