Skip Menu |
 

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

Report information
The Basics
Id: 14782
Status: new
Priority: 0/
Queue: Class-Std

People
Owner: Nobody in particular
Requestors: lyon.lemmens [...] redlemon.nl
Cc:
AdminCc:

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



Subject: Class::Std does noet work with mod_perl
Download (untitled) / with headers
text/plain 762b
=head1 Environment: - kernel 2.6.12-gentoo-r9 SMP - perl 5.8.7 - apache 2.0.54 - mod_perl 2.0.1 =head1 Description: Any "use Class::Std;" in a module that is used in a mod_perl application results in the following error: Too late to run CHECK block at /usr/lib/perl5/site_perl/5.8.7/Class/Std.pm line 359. Hence all modules using Class:Std, such as Config::Std also fail to work. =head1 Explanation: The reason is, I think, explained in "Practical mod_perl" chapter 6.5: <quote> The CHECK and INIT blocks run when compilation is complete, but before the program starts. [...] Perl calls these blocks only during perl_parse( ), which mod_perl calls once at startup time. Therefore, CHECK and INIT blocks don't work in mod_perl [...] </quote>
Subject: Class::Std does not work with mod_perl
From: Bernahrd.Schmalhofer [...] biomax.de
Download (untitled) / with headers
text/plain 463b
[guest - Tue Sep 27 18:16:51 2005]: Show quoted text
> =head1 Description: > > Any "use Class::Std;" in a module that is used in a mod_perl > application results in the following error: > > Too late to run CHECK block at > /usr/lib/perl5/site_perl/5.8.7/Class/Std.pm line 359.
I have run into the same problem. Is there any kind of workaround? My next attempt would be to use only Class::Std::Utils. I suppose that I would have to provide my own destructor then.
Subject: Too late to run CHECK block
Download (untitled) / with headers
text/plain 473b
This issue seems to be reported several times under different titles but not really addressed as far as I can see. I am suprised that the error is not listed in the 'DIAGNOSTICS' section of the module or the fact that it doesn't work with mod_perl listed in the 'BUGS AND LIMITATIONS' section, it would have save me a lot of time :-( Are there any plans to solve this/workarounds or should I give up on Class::Std for my mod_perl/Mason application?? Thanks Stephanie
Date: Fri, 18 Nov 2005 11:21:40 +1100
From: Damian Conway <damian [...] conway.org>
To: bug-Class-Std [...] rt.cpan.org
Subject: Re: [cpan #14782] Too late to run CHECK block
RT-Send-Cc:
Download (untitled) / with headers
text/plain 1020b
Show quoted text
> This issue seems to be reported several times under different titles > but not really addressed as far as I can see. I am suprised that the > error is not listed in the 'DIAGNOSTICS' section of the module
That's because the warning has nothing to do with the module, per se. It's a problem caused by limitations of Perl's C<eval> statement and applies to every Perl module that uses a CHECK block. I.e. it's mod_perl's problem, not Class::Std's. Show quoted text
> or the > fact that it doesn't work with mod_perl listed in the 'BUGS AND > LIMITATIONS' section, it would have save me a lot of time :-(
The problems were only reported after the module was released. And the next release will provide a work-around that will definitely be documented. Show quoted text
> Are there any plans to solve this/workarounds or should I give up on > Class::Std for my mod_perl/Mason application??
You might prefer to use Object::InsideOut instead, which already has workarounds for these issues (though it's less secure that Class::Std). Damian


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.