[Petal] [Utils] Error log messages

Steve Purkis spurkis at mkdoc.com
Tue Sep 9 13:38:35 BST 2003


On Tuesday, September 9, 2003, at 10:50  am, William McKee wrote:

> On Tue, Sep 09, 2003 at 09:55:20AM +0100, Steve Purkis wrote:
>> That's because you have warnings turned on, and this line in Utils.pm:
>>
>> 	88: warnings::warn( "installing Petal plugin: '$name'" )
>> 	      if warnings::enabled;
>>
>> You can turn off warnings for Petal::Utils like so:
>>
>> 	no warnings 'Petal::Utils';
>
> But I'm in a catch-22 because Perl returns an error message if I try to
> put that line before calling Petal::Utils:
>
> [Tue Sep  9 03:46:55 2003] [error] unknown warnings category
> 'Petal::Utils' at /usr/local/apache/conf/startup.pl line 55
>
> I simply commented out line 88 in my version of Petal::Utils. I think
> that's the best long-term solution unless you are debugging the module.

Fair enough - I'll suppress the warning in the next release.


> Or, perhaps we could add a DEBUG flag that would be checked before
> emitting the warning message.

A debug flag is an excellent idea, but for consitency across the Petal 
project it would ideally be added to Petal and used by Petal::Utils.  
There are plenty of ways to do this, if anyone's interested let me know.

-Steve



More information about the Petal mailing list