Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery

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)

Replies are listed 'Best First'.
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 all is quiet...

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (12)
As of 2018-04-20 09:46 GMT
Find Nodes?
    Voting Booth?