On Fri 11 May 2001 16:31, Michael G Schwern <[EMAIL PROTECTED]> wrote:
> On Fri, May 11, 2001 at 01:55:42AM +0100, Graham Barr wrote:
> > On Thu, May 10, 2001 at 07:40:04PM -0500, Jarkko Hietaniemi wrote:
> > > By far most of my use of typeglobs is making aliases, and then mostly
> > > for code:
> > > 
> > >   *color = \&colour;
> > 
> > I would say that probably the most common use now for typeglobs is
> > from the IO:: modules. Which are created with gensym so they are
> > anonymous.
> 
> Personally, I use typeglobs mostly to autogenerate repetitive methods
> without an autoloader:
> 
>         *method = $closure;
> 
> but this should definately have a direct analogy in Perl 6 so I'm not
> worried.

I use it to check if formats exist, since there is no other way to do so
(except maybe an eval that dies :():

    if (defined *{$::{$fmt}}{FORMAT}) {
        local $~ = $fmt;
        write;
        }

but for perl6 it doesn't matter, cause formats will die anyway (even without
an eval :)

-- 
H.Merijn Brand    Amsterdam Perl Mongers (http://www.amsterdam.pm.org/)
using perl-5.6.1, 5.7.1 & 629 on HP-UX 10.20 & 11.00, AIX 4.2, AIX 4.3,
  WinNT 4, Win2K pro & WinCE 2.11.  Smoking perl CORE: [EMAIL PROTECTED]
http:[EMAIL PROTECTED]/   [EMAIL PROTECTED]
send smoke reports to: [EMAIL PROTECTED], QA: http://qa.perl.org

Reply via email to