Doug MacEachern wrote:
> all of the ap_ functions that were in the 1.x Apache::File live in
> different places now, so Apache::compat just needs to 'use' the modules
> with those functions. the Apache::File::{new,open} methods should be
> deprecated (now that we have 'open my $fh, ...'), but stubs put in
> Apache::compat.
I think the following addition to compat.pm covers Apache::File
compatibility. The only issue is with tmpfile. Where should it live?
package Apache::File;
sub new {
my($class) = shift;
my $fh;
my $self = bless \$fh, ref($class)||$class;
return @_ ? $self->open(shift) : $self;
}
sub open {
my($self, $filename) = @_;
open $$self, $filename;
}
sub close {
my($self) = shift;
close $$self;
}
sub tmpfile {
# ???
}
# the following functions now live in Apache::Response
use Apache::Response;
# * discard_request_body
# * meets_conditions
# * set_content_length
# * set_etag
# * set_last_modified
# * update_mtime
# the following functions now live in Apache::RequestRec
use Apache::RequestRec;
# * mtime
--
_____________________________________________________________________
Stas Bekman JAm_pH -- Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide http://perl.apache.org/guide
mailto:stas@stason.org http://ticketmaster.com http://apacheweek.com
http://singlesheaven.com http://perl.apache.org http://perlmonth.com/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org
|