develooper Front page | perl.perl5.porters | Postings from January 2012

Re: [PATCH] undef stringification

Thread Previous | Thread Next
From:
Abigail
Date:
January 25, 2012 01:37
Subject:
Re: [PATCH] undef stringification
Message ID:
20120125093722.GA13322@almanda
On Wed, Jan 25, 2012 at 09:58:50AM +0100, Salvador Fandino wrote:
> Hi,
> 
> The attached patch adds support for a new variable $^U that allows to
> customize the value of undef when it is converted into an string:
> 
> For instance,
> 
>   local $^U = '<undef>';
>   print "hello $some_undefined_var";
> 
> would print:
> 
>   hello <undef>


I like the idea. However, given that we only have a limited number of
$^<single char> variables available (now and in the future), I do have
a bikeshedding contribution: can it be turned into a ${^DESCRIPTION}
variable?


Abigail
--
$^U = "Just another Perl hacker"; print;

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