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

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?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (5)
As of 2015-07-28 02:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (251 votes), past polls