Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

(jeffa) 3Re: Good programming practice

by jeffa (Bishop)
on Nov 03, 2001 at 21:08 UTC ( [id://123054]=note: print w/replies, xml ) Need Help??


in reply to Re: Re: Good programming practice
in thread Good programming practice

i do have a problem with require - it's a bit old, and more importantly, it's not portable. If you design a CPAN style module, you can install it on any system and access it from any program. Then you can 'use' the much better:use jdb; instead of require.

A great reference for building CPAN style modules can be found here: perlnewmod (and no, you don't have to submit your module to CPAN for it to be a CPAN style module).

But first, read perlmod. :)

jeffa

Replies are listed 'Best First'.
Re: (jeffa) 3Re: Good programming practice
by Ven'Tatsu (Deacon) on Nov 04, 2001 at 02:05 UTC
    If you install the module in the @INC path you can require jbd; the same as use, but without the side effect of being done at compile time. If the module depends on runtime data (like $database from the example) swiching to use may cause trouble.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (3)
As of 2024-04-20 02:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found