Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer

Re^3: Parsing Problems

by haukex (Bishop)
on May 13, 2019 at 18:12 UTC ( #1233721=note: print w/replies, xml ) Need Help??

in reply to Re^2: Parsing Problems
in thread Parsing Problems

Has something changed with package, lib, eval, or qq~?

I'm not certain, but there may have been small changes to how eval handles Unicode, but evalbytes was introduced in 5.16, so before the 5.18 that you're migrating away from. Other than that, based on this little piece of code, I don't see anything that might be different between the two versions. And whether something has changed with Text::Unaccent::PurePerl, you'd have to check what version you have installed in both environments (perl -MText::Unaccent::PurePerl -le 'print $Text::Unaccent::PurePerl::VERSION').

If you think you're having trouble with eval, then it's best if you built its argument first, stored it in a variable, used Data::Dumper or Data::Dump to show it, and also check eval for errors using the pattern eval "...; 1" or die "eval failed: $@" (see Bug in eval in pre-5.14). (Update before posting: I see haj made a similar point.)

However, I would strongly recommend against using eval in the first place, building Perl code from strings and trying to run it can be quite brittle, and in many cases even a major security risk. If you were to show more context (SSCCE), we could most likely suggest an alternative without eval (Update: Yep!).

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (2)
As of 2022-05-25 04:24 GMT
Find Nodes?
    Voting Booth?
    Do you prefer to work remotely?

    Results (84 votes). Check out past polls.