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

Mailing List Archive: ModPerl: Dev

[Patch] Document APR::Table->do()

 

 

ModPerl dev RSS feed   Index | Previous | View Threaded


gozer at cpan

Oct 22, 2001, 2:41 AM

Post #1 of 3 (1430 views)
Permalink
[Patch] Document APR::Table->do()

Here you go:

/home/gozer/sources/mod_perl2/deps/perl/bin/perl build/cvsdiff
Index: docs/src/api/mod_perl-2.0/APR/Table.pod
===================================================================
RCS file: /home/anoncvs/mod_perl-docs-cvs/src/api/mod_perl-2.0/APR/Table.pod,v
retrieving revision 1.1
diff -u -I'$Id' -I'$Revision' -r1.1 Table.pod
--- docs/src/api/mod_perl-2.0/APR/Table.pod 2001/10/02 14:59:17 1.1
+++ docs/src/api/mod_perl-2.0/APR/Table.pod 2001/10/22 09:40:32
@@ -21,6 +21,8 @@
$table->merge($key => $val);
overlap($table_a, $table_b, $flags);
$new_table = overlay($table_base, $table_overlay, $pool);
+
+ $table->do(sub {[...]}, [@filter]);

=head1 DESCRIPTION

@@ -134,7 +136,17 @@

=item * do()

- META: ???
+ $table->do(sub {[...]}, [@filter]);
+
+Iterate over all the elements of the table, invoking provided subroutine
+for each element. The subroutine gets passed as argument, a key-value pair.
+
+The subroutine can abort the iteration by returning 0 and should always return
+1 otherwise.
+
+param C<sub>: A subroutine reference or name to be called on each item in the table
+
+param C<@filter>: Only keys matching one of the entries in the filter will be processed

=item * get()





--
Philippe M. Chiasson <gozer [at] cpan>
Extropia's Resident System Guru
http://www.eXtropia.com/

Go away...I'm alright. (last words)
-- H. G. Wells

perl -e '$$=\${gozer};{$_=unpack(P26,pack(L,$$));/^Just Another Perl Hacker!\n$/&&print||$$++&&redo}'


gozer at cpan

Jan 1, 2000, 7:38 AM

Post #2 of 3 (1350 views)
Permalink
Re: [Patch] Document APR::Table->do() [In reply to]

On Tue, Oct 23, 2001 at 12:01:00AM +0800, Stas Bekman wrote:
> Philippe M. Chiasson wrote:
>
> > Here you go:
>
>
> thanks
>
>
> > /home/gozer/sources/mod_perl2/deps/perl/bin/perl build/cvsdiff
> > Index: docs/src/api/mod_perl-2.0/APR/Table.pod
>
> > + $table->do(sub {[...]}, [@filter]);
>
>
> SYNOPSIS usually shows a real example and not an API declaration, would
> something like this fit in here:
>
> $table->do sub { print "key $_[0], value $_[1]\n"}, @valid_keys);

yeah.

>
> _____________________________________________________________________
> Stas Bekman JAm_pH -- Just Another mod_perl Hacker
> http://stason.org/ mod_perl Guide http://perl.apache.org/guide
> mailto:stas [at] stason http://ticketmaster.com http://apacheweek.com
> http://singlesheaven.com http://perl.apache.org http://perlmonth.com/
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe [at] perl
> For additional commands, e-mail: dev-help [at] perl
>

--
Philippe M. Chiasson <gozer [at] cpan>
Extropia's Resident System Guru
http://www.eXtropia.com/

The young think they are immortal, and are determined to
prove otherwise.
-- Larry Wall

perl -e '$$=\${gozer};{$_=unpack(P26,pack(L,$$));/^Just Another Perl Hacker!\n$/&&print||$$++&&redo}'

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe [at] perl
For additional commands, e-mail: dev-help [at] perl


stas at stason

Oct 22, 2001, 9:01 AM

Post #3 of 3 (1353 views)
Permalink
Re: [Patch] Document APR::Table->do() [In reply to]

Philippe M. Chiasson wrote:

> Here you go:


thanks


> /home/gozer/sources/mod_perl2/deps/perl/bin/perl build/cvsdiff
> Index: docs/src/api/mod_perl-2.0/APR/Table.pod

> + $table->do(sub {[...]}, [@filter]);


SYNOPSIS usually shows a real example and not an API declaration, would
something like this fit in here:

$table->do sub { print "key $_[0], value $_[1]\n"}, @valid_keys);


_____________________________________________________________________
Stas Bekman JAm_pH -- Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide http://perl.apache.org/guide
mailto:stas [at] stason http://ticketmaster.com http://apacheweek.com
http://singlesheaven.com http://perl.apache.org http://perlmonth.com/


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe [at] perl
For additional commands, e-mail: dev-help [at] perl

ModPerl dev RSS feed   Index | Previous | View Threaded
 
 


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