develooper Front page | perl.perl5.porters | Postings from September 2012

Re: Module API

Thread Previous | Thread Next
From:
Leon Timmermans
Date:
September 29, 2012 13:32
Subject:
Re: Module API
Message ID:
CAHhgV8husfJ6GanKm99us-0O5jqwAnWzhqN2EuGB3ud53QBTMQ@mail.gmail.com
On Sat, Sep 29, 2012 at 10:30 PM, Johan Vromans <jvromans@squirrel.nl> wrote:
> Interesting...
> Anyway,
>
>   sub package_is_loaded { %{$_[0]."::"} }

That checks the existence of a package in the symbol table, not the
loading or not of a module. After require Foo::Bar, %Foo:: will exist,
even though Foo was never loaded.

Leon

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