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

Re: RFC: Autoloading charnames

Thread Previous | Thread Next
From:
Karl Williamson
Date:
November 27, 2011 16:02
Subject:
Re: RFC: Autoloading charnames
Message ID:
4ED2CF85.2090300@khwilliamson.com
On 11/27/2011 03:43 PM, Ricardo Signes wrote:
> * Karl Williamson<public@khwilliamson.com>  [2011-11-27T17:30:08]
>> I had prototyped #1  some time ago.  I used a simple solution to
>> avoid importing the functions, and that was to use  undocumented
>> mangled names for the function definitions in charnames.pm (simply
>> prefixing them with an underscore, but further mangling could be
>> done), and then in the import method, doing
>> *charnames::viacode = *_viacode;
>> *charnames::vianame = *_vianame;
>> *charnames::string_vianame = *_string_vianame;
>>
>> Is this acceptable, or is a sub-module really needed?
>
> Won't this break (for example) Unicode::UCD, which does "use charnames ()" but
> then calls charnames::viacode?
>
> That seems like a pattern we might find other places, too.  grep.cpan.me is
> down, but I found more than zero results with:
>
>    http://www.google.com/codesearch#search/&q=%22use%20charnames%20%28%29%22%20lang:perl&p=1&type=cs
>

Doh!  It's been long enough since I wrote this prototype that I forgot I 
never ran it through the test suite.

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