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

Re: Bad Module Code

by blue_cowdawg (Monsignor)
on Jul 11, 2003 at 16:03 UTC ( [id://273442]=note: print w/replies, xml ) Need Help??


in reply to Bad Module Code

Well... It is probably a bad idea to have subs anywhere that don't return values for at least some form of "I was able to do that" or "bad things happened to me" kinds of flags to the calling environment.

This is regardless of if you are writing a module or simply a procedure oriented piece of code.

Having said that I violate my own rule all the time when I am coding in a hurry.


Peter L. BergholdBrewer of Belgian Ales
Peter@Berghold.Netwww.berghold.net
Unix Professional

Replies are listed 'Best First'.
Re: Re: Bad Module Code
by exussum0 (Vicar) on Jul 11, 2003 at 19:34 UTC
    Well, that depends. Some things may have useless return calls, such as those that try and push out a command.

    take, say.. something that initiates garbage collection, or flushes buffers. You can't really say it succeeds or fails other than the fact that you've told it to run or not.

    I readily admit, there could be a return value if the request for the subsystem to run is fine, but sometimes, you just don't know. Look at sun's sync function for instance :)

      look at sun's sync function for instance :)

      Please... I just ate... :-)


      Peter L. BergholdBrewer of Belgian Ales
      Peter@Berghold.Netwww.berghold.net
      Unix Professional

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (4)
As of 2024-04-19 12:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found