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

Re: Refactoring Perl 2 - Inline Method

by hossman (Prior)
on Jun 26, 2007 at 20:35 UTC ( #623485=note: print w/ replies, xml ) Need Help??

in reply to Refactoring Perl #2 - Inline Method

It's been a while since i looked at the Refactoring book, but as i recall "Inline Method" is only recommended when the method is only used in a very few number of cases (typically only within the class that defines it)

As you point out, for examples like this it might instead make sense to refactor the constant (5) to a global variable (or to a new method call to get it from configuration) ... either of which might then ultimately lead to a decision to inline the method anyway because it's now easier to read/understand then it was before.

Comment on Re: Refactoring Perl 2 - Inline Method

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (15)
As of 2015-11-30 18:59 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (778 votes), past polls