Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: ModPerl: ModPerl-cvs

cvs commit: modperl/Tie Makefile.PL Tie.pm typemap

 

 

ModPerl modperl-cvs RSS feed   Index | Next | Previous | View Threaded


dougm at hyperreal

May 13, 1998, 7:58 PM

Post #1 of 1 (308 views)
Permalink
cvs commit: modperl/Tie Makefile.PL Tie.pm typemap

dougm 98/05/13 19:58:23

Added: Tie Makefile.PL Tie.pm typemap
Log:
new files

Revision Changes Path
1.1 modperl/Tie/Makefile.PL

Index: Makefile.PL
===================================================================
use ExtUtils::MakeMaker;

my $apache_1_3_inc = join ' ', map {
join '', ' -I../$(APACHE_SRC)/', $_, ' -I$(APACHE_SRC)/', $_;
} qw(include main os/unix);

my $base = "../Apache";

unless (-e "$base/typemap") {
warn "Can't stat Apache/typemap $!";
}

WriteMakefile(
'NAME' => 'Apache::Tie',
'VERSION_FROM' => 'Tie.pm',
INC => '-I../src -I../src/modules/perl -I$(APACHE_SRC) -I../$(APACHE_SRC) '.$apache_1_3_inc,
'TYPEMAPS' => ["$base/typemap"],
'dist' => {
COMPRESS=> 'gzip -9f', SUFFIX=>'gz',
CI => qq(ci -u -m\\"See Changes file\\"),
PREOP => 'co -l README && pod2text Tie.pm > README && ci -u README',
},
);



1.1 modperl/Tie/Tie.pm

Index: Tie.pm
===================================================================
package Apache::Tie;

use strict;
use DynaLoader ();
use vars qw(@ISA $VERSION);
@ISA = qw(DynaLoader);
$VERSION = '0.01';

if($ENV{MOD_PERL}) {
__PACKAGE__->bootstrap($VERSION);
}

1;

__END__

=head1 NAME

Apache::Tie - Tie interfaces to Apache structures

=head1 SYNOPSIS

my $headers_out = $r->headers_out;
while(my($key,$val) = each %$headers_out) {
...
}

my $table = tied %$headers_out;
$table->set(From => 'dougm [at] perl');

=head1 DESCRIPTION

This module provides tied interfaces to Apache data structures.

=head2 CLASSES

=over 4

=item Apache::TieHashTable

The I<Apache::TieHashTable> class provides methods for interfacing
with the Apache C<table> structure.
The following I<Apache> class methods, when called in a scalar context
with no "key" argument, will return a I<HASH> reference,
where I<HASH> is tied to I<Apache::TieHashTable>:

headers_in
headers_out
err_headers_out
notes
dir_config
subprocess_env

=head2 METHODS

=over 4

=item get

Corresponds to the C<ap_table_get> function.

my $value = $table->get($key);

my $value = $headers_out->{$key};

=item set

Corresponds to the C<ap_table_set> function.

$table->set($key, $value);

$headers_out->{$key} = $value;

=item unset

Corresponds to the C<ap_table_unset> function.

$table->unset($key);

delete $headers_out->{$key};

=item clear

Corresponds to the C<ap_table_clear> function.

$table->clear;

%$headers_out = ();

=item add

Corresponds to the C<ap_table_add> function.

$table->add($key, $value);

=item merge

Corresponds to the C<ap_table_merge> function.

$table->merge($key, $value);

=back

=back

=head1 AUTHOR

Doug MacEachern

=head1 SEE ALSO

Apache(3), mod_perl(3)

=cut



1.1 modperl/Tie/typemap

Index: typemap
===================================================================
TYPEMAP
Apache::TieHashTable T_PTROBJ

ModPerl modperl-cvs RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.