develooper Front page | perl.perl5.porters | Postings from November 2011

Re: RFC: Autoloading charnames

Thread Previous | Thread Next
H.Merijn Brand
November 22, 2011 23:42
Re: RFC: Autoloading charnames
Message ID:
On Tue, 22 Nov 2011 15:03:35 -0700, Karl Williamson
<> wrote:

> It has been proposed that charnames automatically load when a \N{} is 
> seen.  That is easy to do, and I think it should load as if the :full 
> and :short options had both been specified.

/me is in favor!

> Does anyone disagree with doing this?

When I use charnames, it is always like

use charnames ":alias" => ":pro";

would autoloading charnames support a default like that? Guess not.
No problem, just to note ...

> If it is done, should the functions in the module also autoload.  That 
> is, should a line like 'my $poo = charnames::viacode(0x1F4A9)' fail if 
> charnames hasn't been 'used' or 'required' or should it cause the module 
> to load ?

No, as the functions are fully qualified, they should not fail

H.Merijn Brand      Perl Monger
using 5.00307 through 5.14 and porting perl5.15.x on HP-UX 10.20, 11.00,
11.11, 11.23 and 11.31, OpenSuSE 10.1, 11.0 .. 11.4 and AIX 5.2 and 5.3. 

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About