Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re^2: What am I breaking?

by perl-diddler (Chaplain)
on May 10, 2019 at 10:02 UTC ( [id://1233554]=note: print w/replies, xml ) Need Help??


in reply to Re: What am I breaking?
in thread What am I breaking? (solved - double unquoting needing 'qw')

No, it's fine -- cuz what I meant by hitting the nail askance -- is that eval really didn't like binary embedded in the source it was 'eval'ing -- as you mentioned. That section was being 'eval'ed twice, once by the new code that looped through the table to create the packages, and second, in the 'use pkg X.Y.Z;' code because you can't use an expression with 'use', so the only way to put in the version I wanted was have the eval "evaluate" the expression so it would behave normally.

My "hints" were that in some of the version strings I had quoted them and had done so deliberately, while in some of the I had not done so (again deliberately) -- and that the final test resulted in some tests that were quoted strings, while others used the 'binary' (as formed by the vector) value of the version string.

That's when I put it together -- why didn't the binary cause problems in original code -- because it is only turned into binary as it is eval'ed in the test case. Since I was evaling it twice, my first eval had to result in both a quoted (the qw('quoted string')) and a non-quoted value (qw(vec.tor)) for the different test cases.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (6)
As of 2024-04-16 10:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found