Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much

Re: Test::More not working with Perl local special variables

by space_monk (Chaplain)
on Apr 22, 2013 at 19:13 UTC ( #1029956=note: print w/replies, xml ) Need Help??

in reply to Test::More not working with Perl local special variables

The $& in the string (last parameter) is evaluated at the time of the call to like, whereas the regex comparison is performed within the method, so using the local variables in the way you have described is doomed to failure.

Looking at the code, the name parameter is passed through a couple of methods to Test::Builder::_regex_ok, so I don't think you can escape the string up a few levels either.

If any of my proposed solutions have minor errors, it's because I don't waste my genius on trivial matters. :-P
  • Comment on Re: Test::More not working with Perl local special variables

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1029956]
[GotToBTru]: I appreciate the ability to highlight matching brackets/ parentheses/ braces, both for my own code and the inconsistently indented code of others
[Corion]: I like editors that automatically highlight the matching parenthesis (like % in vi), but that's roughly the extent to which I like editor support ;)
[GotToBTru]: same here Corion.
[Corion]: I tried for a short time (well, 8 hours now) to get Perl::Tidy set up but then found that it doesn't support (new-style) signatures and then stopped again ;))
[GotToBTru]: changing the font color of the rest of the document just because I typed a single quote character is annoying

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (9)
As of 2017-02-27 12:53 GMT
Find Nodes?
    Voting Booth?
    Before electricity was invented, what was the Electric Eel called?

    Results (385 votes). Check out past polls.