Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: Help with 'use Warnings' please?

by davorg (Chancellor)
on Jul 13, 2009 at 15:47 UTC ( [id://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

Replies are listed 'Best First'.
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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://779637]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (4)
As of 2024-03-28 20:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found