Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked

Re: Question about this simple CGI

by CountZero (Bishop)
on Jul 18, 2013 at 13:54 UTC ( #1045101=note: print w/ replies, xml ) Need Help??

in reply to Question about this simple CGI

As this is a term project, you should be very careful in what you write.

So ask yourself (before the professor asks you):

  • Why do I use the -w flag in the hashbang line AND use warnings;
  • Why do I add parentheses in use DBI();


A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James

My blog: Imperial Deltronics

Comment on Re: Question about this simple CGI
Select or Download Code
Replies are listed 'Best First'.
Re^2: Question about this simple CGI
by petdance (Parson) on Sep 24, 2013 at 15:38 UTC
    I use parens in use calls to explicitly show that nothing is getting imported from the module.


Re^2: Question about this simple CGI
by Your Mother (Chancellor) on Sep 24, 2013 at 16:31 UTC

    It means your professor is either overly tricky or should think his/her questions through a bit more. In the case of DBI the parens do nothing except take up space and maybe mislead someone.

    ~>ack \@EXPORT @EXPORT = (); # we export nothing by default @EXPORT_OK = qw(%DBI %DBI_methods hash); # also populated by export_ok +_tags:

    Update: DERP, didn't see the whole thread. CountZero is asking a good question. The answer to which is... left as an exercise for the reader you.

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (7)
As of 2015-11-25 07:20 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (672 votes), past polls