Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"

Re: Test::Deep regex on hash keys

by LanX (Archbishop)
on Dec 26, 2013 at 08:58 UTC ( #1068403=note: print w/replies, xml ) Need Help??

in reply to [SOLVED] Test::Deep regex on hash keys

Hash keys are always strings, you know that this test is useless?

Could you plz show complete code using Test::Deep that fails?

This is just a data structure, does it already fail?

I suppose you need to explicitly use keys for such tests, you can't stuff a regex into a key slot cause they are stringyfied.

Cheers Rolf

( addicted to the Perl Programming Language)

Replies are listed 'Best First'.
Re^2: Test::Deep regex on hash keys
by Zoffix (Acolyte) on Dec 26, 2013 at 09:14 UTC
    I know they're always strings. The problem is without specifying "any value for the key", I can't tell it to inspect the deeper structure of where it points. I don't have any code, because I don't know how to tell it to assume any string for the key is valid.

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (8)
As of 2019-10-14 22:47 GMT
Find Nodes?
    Voting Booth?