Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: variable scope within eval{}

by crashtest (Curate)
on Jan 30, 2010 at 00:13 UTC ( #820434=note: print w/ replies, xml ) Need Help??


in reply to variable scope within eval{}

I think the assembled monks are scratching their heads because there's nothing all that special about an eval{} block. It should be simple enough to test - just compare the results of running your code as is and with the eval { ... }; opening/close lines commented out.

Something else that caught my eye is the way you're calling insert_budget_line_year. The => arrow notation implies you're building a hash from the arguments, but then I'd expect:

@bly_id = insert_budget_line_year ( bl_id => $bl_id, planning_horizon => \@planning_horizon, # array ref...? );
Depends on how you're handling the parameters in the subroutine.

Perhaps if you showed the pertinent parts of insert_budget_line_year, it might shed more light on what's happening.


Comment on Re: variable scope within eval{}
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (7)
As of 2014-10-26 07:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (152 votes), past polls