Skip Menu |

This queue is for tickets about the Class-Spiffy CPAN distribution.

Report information
The Basics
Id: 17272
Status: new
Priority: 0/
Queue: Class-Spiffy

People
Owner: Nobody in particular
Requestors: ingy [...] ttul.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



CC: bug-Spiffy [...] rt.cpan.org, bug-Class-Spiffy [...] rt.cpan.org, ingy [...] cpan.org
Subject: Re: Spiffy and Class::Spiffy cause Apache::Reload to emit warnings
Date: Wed, 25 Jan 2006 02:38:49 -0800
To: Henrik <henrik [...] adapt.dk>
From: ingy [...] ttul.org (Ingy dot Net)
Henrik, Thanks. I'll take care of it. Cheers, Ingy On 25/01/06 10:14 +0100, Henrik wrote: Show quoted text
> Both Spiffy and Class::Spiffy add mixin.pm to %INC - without the file > mixin.pm existing. > This causes Apache::Reload to emit an error saying 'Apache::Reload: > Can't locate Class/Spiffy/mixin.pm' - giving unneeded noise in our logs. > > Creating the file mixin.pm without content removes the errormessage and > doesn't seem to have any adverse effects. > > Could you please create the file mixin.pm in your distribution so that > we can continue to use YAML and have nice emtpy error-logs. > > The offending code is: > > #=============================================================================== > # This code deserves a spanking, because it is being very naughty. > # It is exchanging base.pm's import() for its own, so that people > # can use base.pm with Class::Spiffy modules, without being the wiser. > #=============================================================================== > my $real_base_import; > my $real_mixin_import; > > BEGIN { > require base unless defined $INC{'base.pm'}; > $INC{'mixin.pm'} ||= 'Class/Spiffy/mixin.pm'; > $real_base_import = \&base::import; > $real_mixin_import = \&mixin::import; > no warnings; > *base::import = \&spiffy_base_import; > *mixin::import = \&spiffy_mixin_import; > } > > > > -- > Thanks > Henrik Tougaard, Adapt A/S, Copenhagen. > htoug@cpan.org