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

Re: Help with 'use Warnings' please?

by davorg (Chancellor)
on Jul 13, 2009 at 15:47 UTC ( #779637=note: print w/ replies, xml ) Need Help??


in reply to Help with 'use Warnings' please?

There's quite a bit of important code missed out of your example, so it's hard to know exactly what's going wrong. Using strict as well as warnings would probably help.

Sounds like it's some kind of scoping issue in your closure. Try adding use diagnostics to your code and see if that gives more detail.

--

See the Copyright notice on my home node.

Perl training courses


Comment on Re: Help with 'use Warnings' please?
Re^2: Help with 'use Warnings' please?
by JavaFan (Canon) on Jul 13, 2009 at 15:57 UTC
    Using strict as well as warnings would probably help.
    Looking at perldiag at the entry for the warning which is closest what is quoted by the OP, using strict would not help. In fact, it can only happen with lexicals - it shouldn't happen with package variables.
Re^2: Help with 'use Warnings' please?
by wa4otj (Beadle) on Jul 13, 2009 at 17:00 UTC
    I could have posted the entire example, but it would have been much too long. I am using strict, and the code I posted does in fact show pretty much exactly what is going on.

    I will experiment with 'use diagnostics' and see what that reveals. Thanks for the suggestion.

    Nat

      I could have posted the entire example, but it would have been much too long. I am using strict, and the code I posted does in fact show pretty much exactly what is going on.

      The best way to get help here is to post a self-contained program which exhibits your problem. If we can run your program, then it's far more likely that we'll be able to find the issue.

      I find that in the process of cutting a program down to an example that illustrates a particular problem, it often gives me a different perspective and enables me to find a solution without even posting here.

      --

      See the Copyright notice on my home node.

      Perl training courses

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (7)
As of 2014-12-26 00:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (163 votes), past polls