Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: use the CGI.pm module only when script is used by a browser

by ivey (Beadle)
on Jun 06, 2000 at 07:09 UTC ( [id://16542]=note: print w/replies, xml ) Need Help??


in reply to use the CGI.pm module only when script is used by a browser

The easy way:
strip the code from the CGI into a function library, and require it from both the CGI and the command-line version. should be 3 minutes of effort.

The better way:
make a .pm of the functions, maybe even using the OO-style, and then just use it.

either way will work well.

  • Comment on Re: use the CGI.pm module only when script is used by a browser

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (3)
As of 2024-07-25 09:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    erzuuli‥ 🛈The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.