Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re^3: Backdating strict

by AnomalousMonk (Archbishop)
on Dec 06, 2020 at 23:45 UTC ( [id://11124759]=note: print w/replies, xml ) Need Help??


in reply to Re^2: Backdating strict
in thread Backdating strict

... $dbh ... is defined in require "incl/common.pl"; without the my keyword.

Then it is a package-global variable. What namespace (package) does incl/common.pl use? If there is no explicit package statement in the required file, I believe it will be in the default main package (update: or whatever package is active in the file into which incl/common.pl is required). So, try
    my $update_time = $main::dbh->selectrow_array("SELECT NOW()");
i.e., use the fully qualified variable name.

Also, $::dbh is shorthand for $main::dbh.


Give a man a fish:  <%-{-{-{-<

Log In?
Username:
Password:

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

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

    No recent polls found