Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
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 pondering the Monastery: (3)
As of 2014-09-18 02:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (104 votes), past polls