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

Tying a namespace

Thread Next
Luke Palmer
May 27, 2004 02:40
Tying a namespace
Message ID:
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?


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