Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re^2: What the heck does "tests->{$stype} ||= {};" do?

by Bloodnok (Vicar)
on Sep 20, 2008 at 10:38 UTC ( [id://712720]=note: print w/replies, xml ) Need Help??


in reply to Re: What the heck does "tests->{$stype} ||= {};" do?
in thread What the heck does "tests->{$stype} ||= {};" do?

... the 2 lines in question could be restated, IMCO without losing (maybe even introducing) clarity, to:
my %tests = %{$tests->{$stype} || {}};

A user level that continues to overstate my experience :-))

Replies are listed 'Best First'.
Re^3: What the heck does "tests->{$stype} ||= {};" do?
by ikegami (Patriarch) on Sep 20, 2008 at 11:23 UTC

    That's not equivalent. In your code, $tests->{$stype} is never assigned anything.

    But it's probably better. Assigning to $tests->{$stype} was probably a side-effect.

      Thanx for that ikegami, - as usual you've spotted the deliberate mistake ;-)

      A user level that continues to overstate my experience :-))

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (7)
As of 2024-04-19 20:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found