Displaying facets
Posted on September 6th, 2007 by Eric Lease Morgan
This little program simply lists all the facets in your MyLibrary instance. It does this through the use of the get_facets method:
#!/usr/bin/perl
# require mylibrary & practice good programming
use MyLibrary::Core;
use strict;
# loop through all the facets
foreach my $facet ( MyLibrary::Facet->get_facets ) {
# display this facet's characteristics
print ' ID: ' . $facet->facet_id . "\n";
print ' Name: ' . $facet->facet_name . "\n";
print ' Note: ' . $facet->facet_note . "\n";
print "\n";
}
# done
exit;
Discussion Area - Leave a Comment
You must be logged in to post a comment.