Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re(5): How to end a Perl script

by Dog and Pony (Priest)
on May 03, 2002 at 07:50 UTC ( [id://163730]=note: print w/replies, xml ) Need Help??


in reply to Re: Re: Re: Re: How to end a Perl script
in thread How to end a Perl script

Sorry to keep this going, but I do not see what the win would be by doing it your way. Maybe it fulfills some way of doing it that some guru has claimed is the best (yes, I remember the debate over Cargo Cult programming). I don't say it is bad doing it your way, I don't see what the big deal is actually.

Using "1;" is as readable as a comment to me and most others - actually, you could think of it as one if you wish? Or is comments just plain unnecessary too (I mean, perl will run without them)? Sorry about that sarcasm, but it really looks like "Cargo Cult" is used as a buzzword this time (again).

Again, sorry to keep the discussion alive like this.


You have moved into a dark place.
It is pitch black. You are likely to be eaten by a grue.

Replies are listed 'Best First'.
Re: Re(5): How to end a Perl script
by demerphq (Chancellor) on May 03, 2002 at 10:23 UTC
    Using "1;" is as readable as a comment to me and most others

    Why bother using 1? I mean the requirement is only that whatever is used evaluates as true, thus much more interesting and entertaining are possible. From Carp::Assert by Schwern

    return q|You don't just EAT the largest turnip in the world!|;
    From Tie::Cycle and Tie::FlipFlop by abigail
    "Tie::Cycle"; "End of Tie::FlipFlop";
    And I'm sure there are lots more examples... :-)

    As to samtregar I have to say that your use of Cargo Cult in this context wasn't well thought through. Thats like saying that putting in a trailing comma in your arguments lists or hash declarations or using a semicolon on the last statement of a block or any of the other unecessary things that perl allows you to do in the interest of minimizing errors in the long term are Cargo Cult programming. And I just cant see you arguing that point :-)

    Yves / DeMerphq
    ---
    Writing a good benchmark isnt as easy as it might look.
    <super>Edited: removed unintentionally confrontational wording.</super>

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (2)
As of 2024-04-19 01:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found