Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re^4: determine the variable causing the error: Use of uninitialized value

by LanX (Chancellor)
on Apr 13, 2017 at 19:35 UTC ( #1187872=note: print w/replies, xml ) Need Help??


in reply to Re^3: determine the variable causing the error: Use of uninitialized value
in thread determine the variable causing the error: Use of uninitialized value

> it doesn't work with more complex structures like hashes (or references to hashes)

To rephrase it, your problem are undefined elements of data structures like $h{x}.

I don't think there is any out of the box solution and you'd need to send a feature request.

As a side note: a hack could be to add a signal handler which parses the OP tree at the caller for all undefined entries .

But that's far from trivial.

Cheers Rolf
(addicted to the Perl Programming Language and ☆☆☆☆ :)
Je suis Charlie!

  • Comment on Re^4: determine the variable causing the error: Use of uninitialized value

Replies are listed 'Best First'.
Re^5: determine the variable causing the error: Use of uninitialized value (hack)
by LanX (Chancellor) on Apr 15, 2017 at 01:25 UTC
Re^5: determine the variable causing the error: Use of uninitialized value
by ruqui (Acolyte) on Apr 16, 2017 at 02:37 UTC
    Thank you for your suggestion Rolf, what should I do in order to send a feature request?
      I'm sorry but chances are too low, if you follow the discussion, especially the contributions by Dave_the_m you will see that is far too complicated too implement in core.

      update
      Anyway I've already shown code to help you in a pragmatic way

      Cheers Rolf
      (addicted to the Perl Programming Language and ☆☆☆☆ :)
      Je suis Charlie!

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1187872]
help
Chatterbox?
[erix]: to lift your spirits, here is some more happy Randy news...
[Lady_Aleena]: The reason I would like to use pcregrep is because it can do multiline searches supposedly.
[perldigious]: What are your criteria for looking Tanktalus? What things must a job have for you to consider it? And where are you in your career? Start, middle, or end?
[erix]: are there any regex-engines that do not do multiline?
[Lady_Aleena]: erix, grep doesn't.
[Lady_Aleena]: Linux grep that is...
[Lady_Aleena]: $ grep --include=*.p[lm] -Ern 'get_(array|hash| data)' does not do multiline search.
[Discipulus]: focus on Perl LA; you can already search multiline patterns
[erix]: grep is a program, not a regex-engine
[Tanktalus]: perldigious: I'm 20 years in, and I don't want to move ;)

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (12)
As of 2017-05-23 19:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?