Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re^3: scope and undef

by eric256 (Parson)
on Aug 28, 2007 at 17:03 UTC ( #635650=note: print w/ replies, xml ) Need Help??


in reply to Re^2: scope and undef
in thread scope and undef

In that code you do a foreach on a hashref. I don't think that destroy is actualy looping at all. Shouldn't it be foreach (keys %{$self->{_db_handle}})?

sub DESTROY { my $self = shift; foreach ($self->{_db_handle}) { $self->{_db_handle}{$_}->disconnect; } }

___________
Eric Hodges


Comment on Re^3: scope and undef
Select or Download Code
Replies are listed 'Best First'.
Re^4: scope and undef
by Ryszard (Priest) on Aug 29, 2007 at 07:37 UTC
    You're right there, its a bug in the code. I've actually fixed that in the one that i'm using (but have neglected to update the version here.. )

    well spotted! :-)

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (17)
As of 2015-07-07 19:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (93 votes), past polls