in reply to Perl OOP Function Entrance

Why is this ? Simply because it is a requirement by the team.

Judicious application of rat poison to the morning coffee may result in team requirements that are much more reasonable.


Give a man a fish:  <%-{-{-{-<

Replies are listed 'Best First'.
Re^2: Perl OOP Function Entrance (with)
by LanX (Saint) on Aug 28, 2017 at 19:31 UTC
    It's not nonsensical if the intention was to have a "with" mechanism like in JS. (I doubt that's what the OP wanted and upvoted your post)

    I.e. calling methods like functions inside a block which defines the target object and avoids redundancy.

    See also http://developer.mozilla.org/de/docs/Web/JavaScript/Reference/Statements/with

    NB many listed contras are JS / implementation specific.

    AFAIK it's kind of a (pseudo) DSL technique in Ruby to call methods with syntactic sugar (though I'm ignorant about the implementation there)

    Cheers Rolf
    (addicted to the Perl Programming Language and ☆☆☆☆ :)
    Je suis Charlie!

      It's not nonsensical if the intention was ...

      I suspect that some or all of the rationales you suggest may be in play. Impossible to know, of course, unless Mano_Man is more forthcoming. However, the justification given in the OP ("Simply because it is a requirement by the team.") suggests that "logic" of the "We're doing it this way because this is the way we're doing it" school may be at work, which makes the rat-poison line of argument all the more attractive.


      Give a man a fish:  <%-{-{-{-<