develooper Front page | perl.perl5.porters | Postings from March 2017

Re: The tricky issue of do()

Thread Previous | Thread Next
From:
David Nicol
Date:
March 30, 2017 13:45
Subject:
Re: The tricky issue of do()
Message ID:
CAFwScO9h_FTOaExGnPp__-4eVLMKjknxudB30oc4m1pMKrM0Mg@mail.gmail.com
And the moral of the story was, "avoid relying on the text of exceptions
whenever possible."
I almost brought this up yesterday in a code review while criticizing

    if ($could_be_a_scalar_or_an_object =~ /HASH/){
             ... # handle when its an object

as fragile.

On Thu, Mar 30, 2017 at 3:57 AM, Kent Fredric <kentfredric@gmail.com> wrote:
>
>
> Although I'm in favour of the change in the direction of clarity, I
> should point out that "its just a string" change happened once with
> Carp. Somebody added a "." to the strings and created a respectable
> amount of breakage :)
>



-- 
the courts of justice shall be open to every person, and certain remedy
afforded for every injury to person, property or character, and that right
and justice shall be administered without sale, denial or delay. --
Missouri Constitution, Art. I, Sec. 14

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About