[Koha-bugs] [Bug 14185] Noisy warns in opac-readingrecord.pl

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Wed May 13 19:48:59 CEST 2015


http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14185

M. Tompsett <mtompset at hotmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mtompset at hotmail.com

--- Comment #5 from M. Tompsett <mtompset at hotmail.com> ---
(In reply to Aleisha Amohia from comment #4)
> I'm still very new to perl and had seen this warn solved this way before so
> just did it again.

Ah, okay. :) I didn't know. When I started perl, I was unaware of //. The
difference between || and // is an important distinction to know. :)

undef || 'blah'; -- This is 'blah'
0     || 'blah'; -- This is 'blah'
''    || 'blah'; -- This is 'blah'
undef // 'blah'; -- This is 'blah'
0     // 'blah'; -- This is 0
''    // 'blah'; -- This is ''

As you can see // depends on whether the value is actually defined, not just
its truth value. So, you actually chose the better operator inadvertently. :)

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list