Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot

Re^2: The 'eval "require $module; 1"' idiom (one character cargo cult)

by Anonymous Monk
on Apr 19, 2014 at 09:25 UTC ( #1082879=note: print w/ replies, xml ) Need Help??

in reply to Re: The 'eval "require $module; 1"' idiom
in thread The 'eval "require $module; 1"' idiom

I generally consider it to be cargo cult. There's no situation where require lives but returns false.

So the threshold for "cargo cult programming" is one character?

I don't think you can ever determine if this idiom is caro-cult based on this idiom, especially in isolation

Comment on Re^2: The 'eval "require $module; 1"' idiom (one character cargo cult)
Re^3: The 'eval "require $module; 1"' idiom (one character cargo cult)
by tobyink (Abbot) on Apr 19, 2014 at 09:38 UTC

    As per your own link, cargo cult programming is the ritual inclusion of code or program structures that serve no real purpose. This is code that serves no real purpose. I don't have a character threshold. If it were possible to include code or program structures using zero characters, and that code or structure served no purpose, then I'd argue that to be cargo cult too.

    This kind of thing is what gives newcomers to Perl the impression that it's full of magical incantations, and they'd be better off using Python. (I grant you that this is a very minor and seemingly insignificant example, but it does all add up!)

    use Moops; class Cow :rw { has name => (default => 'Ermintrude') }; say Cow->new->name

      As per your own link, ...omit the essence that is ritual inclusion without understanding../


      How is one character a ritual? How is using it inclusion without understanding?

        ; 1 is more than one character and stupid c&p b/c "many others did before" is cargo cult.

        Cheers Rolf

        ( addicted to the Perl Programming Language)

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (6)
As of 2015-01-26 06:02 GMT
Find Nodes?
    Voting Booth?

    My top resolution in 2015 is:

    Results (186 votes), past polls