Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: Uninitialized value and a dot between $schema and $table

by holli (Abbot)
on Aug 08, 2019 at 21:13 UTC ( #11104195=note: print w/replies, xml ) Need Help??


in reply to Uninitialized value and a dot between $schema and $table

This is what you've seen if you had actually used strict instead of just pretending to.
Global symbol "$dsn" requires explicit package name (did you forget to + declare "my $dsn"?) at pm13.pl line 9. Global symbol "$database" requires explicit package name (did you forg +et to declare "my $database"?) at pm13.pl line 9. Global symbol "$dbh" requires explicit package name (did you forget to + declare "my $dbh"?) at pm13.pl line 10. Global symbol "$dsn" requires explicit package name (did you forget to + declare "my $dsn"?) at pm13.pl line 10. Global symbol "$dbh" requires explicit package name (did you forget to + declare "my $dbh"?) at pm13.pl line 12. Global symbol "$schema" requires explicit package name (did you forget + to declare "my $schema"?) at pm13.pl line 12. Global symbol "$table" requires explicit package name (did you forget +to declare "my $table"?) at pm13.pl line 12. Execution of pm732.pl aborted due to compilation errors.


holli

You can lead your users to water, but alas, you cannot drown them.

Replies are listed 'Best First'.
Re^2: Uninitialized value and a dot between $schema and $table
by tukusejssirs (Beadle) on Aug 08, 2019 at 21:40 UTC

    (1) I donít just pretend, I use use strict;.

    (2) Yeah, I forgot my before definition of $dsn; $dbh, my mistake. However, I only copy-pasted this code, I have properly defined all variables in the full code. On the other hand, I modified the code so much that I cannot reproduce the error now. Still I have some other errors (like Global symbol "$cols_type" requires explicit package name at ./test6.pl line 156.), which are somewhat related to this, however, all my variables are properly declared/defined (I have double-checked it).

    Iím sorry I opened this poor-quality question. :(

      Iím sorry I opened this poor-quality question. :(

      No harm done. Just keep in mind: the more accurate the question, the better the answers.

      perl -le'print map{pack c,($-++?1:13)+ord}split//,ESEL'

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (2)
As of 2022-08-08 13:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?