Update of /cvsroot/openinteract/OpenInteract2/extra_packages/delicious_tags/doc
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23210/doc
Modified Files:
delicious_tags.pod
Log Message:
change how the class is referenced in SYNOPSIS
Index: delicious_tags.pod
===================================================================
RCS file: /cvsroot/openinteract/OpenInteract2/extra_packages/delicious_tags/doc/delicious_tags.pod,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** delicious_tags.pod 27 Nov 2004 17:10:55 -0000 1.5
--- delicious_tags.pod 27 Nov 2004 18:04:24 -0000 1.6
***************
*** 59,76 ****
" Tag: $info->{tag}; URL: $url\n";
}
-
-
- # These are class methods we cleverly disguise as being called from
- # an object without state because it's less typing...
! my $tagger = OpenInteract2::DeliciousTag->new;
# Fetch available tags
! my $tags = $tagger->fetch_all_tags;
print "Available tags: ", join( ', ', @{ $tags } );
# Fetch available tags with the number of objects in each
! my $tags_and_counts = $tagger->fetch_all_tags_with_count;
foreach my $tag_and_count( @{ $tags_with_count } ) {
print "$tag_and_count->[0]: $tag_and_count->[1]\n";
--- 59,74 ----
" Tag: $info->{tag}; URL: $url\n";
}
! # Class methods on our SPOPS class
!
! my $tag_class = CTX->lookup_object( 'delicious_tag' );
# Fetch available tags
! my $tags = $tag_class->fetch_all_tags;
print "Available tags: ", join( ', ', @{ $tags } );
# Fetch available tags with the number of objects in each
! my $tags_and_counts = $tag_class->fetch_all_tags_with_count;
foreach my $tag_and_count( @{ $tags_with_count } ) {
print "$tag_and_count->[0]: $tag_and_count->[1]\n";
***************
*** 78,82 ****
# You can also fetch as an arrayref of hashrefs
! my $tags_and_counts = $tagger->fetch_all_tags_with_count( {} );
foreach my $tag_and_count( @{ $tags_with_count } ) {
print "$tag_and_count->{tag}: $tag_and_count->{count}\n";
--- 76,80 ----
# You can also fetch as an arrayref of hashrefs
! my $tags_and_counts = $tag_class->fetch_all_tags_with_count( {} );
foreach my $tag_and_count( @{ $tags_with_count } ) {
print "$tag_and_count->{tag}: $tag_and_count->{count}\n";
***************
*** 84,98 ****
# Fetch a count by tag
! my $count = $tagger->fetch_count( 'sometag' );
print "Number of objects with tag 'sometag': $count\n";
# Find related tags -- this will find all other tags attached to
# objects attached to this tag
! my $tags = $tagger->fetch_related_tags( 'sometag' );
print "Other tags related to 'sometag': ", join( ', ', @{ $tags } );
# Similarly, find tag and count for related tags
print "Also related to 'sometag':\n";
! my $tags = $tagger->fetch_related_tags_with_count( 'sometag' );
foreach my $tag_and_count( @{ $tags_with_count } ) {
print " - $tag_and_count->{tag}: $tag_and_count->{count}\n";
--- 82,96 ----
# Fetch a count by tag
! my $count = $tag_class->fetch_count( 'sometag' );
print "Number of objects with tag 'sometag': $count\n";
# Find related tags -- this will find all other tags attached to
# objects attached to this tag
! my $tags = $tag_class->fetch_related_tags( 'sometag' );
print "Other tags related to 'sometag': ", join( ', ', @{ $tags } );
# Similarly, find tag and count for related tags
print "Also related to 'sometag':\n";
! my $tags = $tag_class->fetch_related_tags_with_count( 'sometag' );
foreach my $tag_and_count( @{ $tags_with_count } ) {
print " - $tag_and_count->{tag}: $tag_and_count->{count}\n";
|