[Catalyst] Accessing mod_perl components
Matt S Trout
dbix-class at trout.me.uk
Wed Jan 18 02:31:24 CET 2006
On Tue, Jan 17, 2006 at 05:13:06PM -0800, Dylan Vanderhoof wrote:
> Not sure if there's a Catalyst way to do this. I'd like to be able to access some constants in Apache2::Const, as well as the lookup_file function of the mod_perl request object.
>
> Specifically, I'd like to be able to do this: $self->r->lookup_file("<file/dir name>")->content_type; or something equivalent.
> I'd like to be able to differentiate files from directories by doing a compare against the DIR_MAGIC_TYPE constant in Apache2::Const, which is the need for that. Other perl magic number libraries I've tried are calling directories application/octet-stream, which is obviously not correct.
>
> Any suggestions here? Is any part of mod_perl exposed to Catalyst, or is there another approach I should be taking?
http://search.cpan.org/~agrundma/Catalyst-Engine-Apache-1.06/lib/Catalyst/Engine/Apache.pm
c.f. the documentation on the 'apache' method.
--
Matt S Trout Offering custom development, consultancy and support
Technical Director contracts for Catalyst, DBIx::Class and BAST. Contact
Shadowcat Systems Ltd. mst (at) shadowcatsystems.co.uk for more information
+ Help us build a better perl ORM: http://dbix-class.shadowcatsystems.co.uk/ +
More information about the Catalyst
mailing list