Couch-DB

 view release on metacpan or  search on metacpan

bin/reference-table  view on Meta::CPAN

32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
###### parse the couchdb api index
####
 
sub fill_index()
{
        my $routing;
        if($refresh || ! -r $couchdb_cache || -M $couchdb_cache > 14)
        {       print "Loading new routing table from couchdb.org\n";
                my $ua = LWP::UserAgent->new;
                my $overview = $ua->get($couchdb_index);
                $routing     = $overview->decoded_content;
                write_text $couchdb_cache, $routing;
        }
        else
        {       $routing     = read_text $couchdb_cache;
        }
         
        my $tree = HTML::TreeBuilder->new_from_content($routing);
        #my $table = $tree->elementify->find('table');
        foreach my $tr ($tree->elementify->find('table')->find('tr'))
        {       my (undef, $which, $what) = $tr->find('td');

lib/Couch/DB.pm  view on Meta::CPAN

530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
#-------------
 
#### Extension which perform some tasks which are framework object specific.
 
# Returns the JSON structure which is part of the response by the CouchDB
# server.  Usually, this is the body of the response.  In multipart
# responses, it is the first part.
sub _extractAnswer($)  { panic "must be extended" }
 
# The the decoded named extension from the multipart message
sub _attachment($$)    { panic "must be extended" }
 
# Extract the decoded body of the message
sub _messageContent($) { panic "must be extended" }
 
1;
 
#-------------



( run in 0.278 second using v1.01-cache-2.11-cpan-33209edd8b4 )