~ubuntu-branches/ubuntu/edgy/libapache2-mod-perl2/edgy-updates

« back to all changes in this revision

Viewing changes to docs/api/APR/Table.pod

  • Committer: Bazaar Package Importer
  • Author(s): Adam Conrad
  • Date: 2006-03-24 02:48:44 UTC
  • mfrom: (1.1.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20060324024844-73oxqkcj2jmlmh2t
Tags: 2.0.2-2build1
Fake sync to bring in new upstream bugfixes, UVF exception by mdz.

Show diffs side-by-side

added added

removed removed

Lines of Context:
349
349
  print "Counted $filter_count elements";
350
350
  
351
351
  sub my_filter {
352
 
      my($key, $value) = @_;
 
352
      my ($key, $value) = @_;
353
353
      warn "$key => $value\n";
354
354
      $filter_count++;
355
355
      return 1;
366
366
by returning 0 when this happens.
367
367
 
368
368
  sub my_filter {
369
 
      my($key, $value) = @_;
 
369
      my ($key, $value) = @_;
370
370
      $filter_count++;
371
371
      return $filter_count == int(TABLE_SIZE)/2 ? 0 : 1;
372
372
  }
976
976
 
977
977
  $table->add("a" => 1);
978
978
  $table->add("b" => 2);
979
 
  $table->add("c" => 3);
 
979
  $table->add("a" => 3);
980
980
  
981
981
  ($k, $v) = each %$table; # (a, 1)
982
982
  print $table->{a};       # prints 1