develooper Front page | perl.perl5.porters | Postings from May 2004

Tying a namespace

Thread Next
From:
Luke Palmer
Date:
May 27, 2004 02:40
Subject:
Tying a namespace
Message ID:
20040526215833.GA7546%luke@luqui.org
Is there a way to tie a namespace hash.  As in, I can do this:

    BEGIN { *Foo::Bar:: = \%Baz:: }

And make Foo::Bar:: an alias of Baz::, but I can't do:

    BEGIN {
        tie my %impl => Something;
        *Foo::Bar:: = \%impl;
    }

And get something like:

    print $Foo::Bar::x

To call Something::FETCH.  Is there a way to do this?

Luke

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