develooper Front page | perl.perl5.porters | Postings from October 2003

Re: [perl #24350] package base produces incorrect error messages

Michael G Schwern
October 29, 2003 20:40
Re: [perl #24350] package base produces incorrect error messages
Message ID:
On Wed, Oct 29, 2003 at 10:32:21AM -0000, (via RT) wrote:
> When trying to use a module as base package which does not exist,
> package base will bail out with the message:
>   Base class package "MODULE::DOES::NOT::EXIST" is empty.
>   (Perhaps you need to 'use' the module which defines that package first.)
> Code which leads to this error:
>   use base 'MODULE::DOES::NOT::EXIST';
> The error message should state:
>    Can't locate MODULE/DOES/NOT/ in @INC .... cannot assume that the base class maps to a real file.  Consider
the following.

    use base qw(Tie::StdHandle);

There is no Tie/  Its (unfortunately) in Tie/
With your patch the error message would be incorrect.

Michael G Schwern
If God made anything more guerrila than your breast, I hope he kept it for
your father. Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About