Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: Re: Database hash/array mapping and OO

by inblosam (Monk)
on May 15, 2004 at 13:58 UTC ( [id://353630]=note: print w/replies, xml ) Need Help??


in reply to Re: Database hash/array mapping and OO
in thread Database hash/array mapping and OO

Read that, didn't help too much. Just says use my and don't use local. I tried using local anyhow and that didn't fix the 'Global' error I got. Class::DBI probably is the way to go...I figured someone had done what I was trying to do before.
  • Comment on Re: Re: Database hash/array mapping and OO

Replies are listed 'Best First'.
Re: Re: Re: Database hash/array mapping and OO
by Fletch (Bishop) on May 15, 2004 at 15:23 UTC

    No, you need to read again and understand the scoping of lexical variables. Your my %columns delcaration is only good for the sub you declare it in. If you want it visible to both subs you need to declare it outside of them at the file scope. CwS explains this.

Log In?
Username:
Password:

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

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

    No recent polls found