#!/usr/bin/perl -w # Example 5-5. This is a standalone script, so it needs to # define a net() callback use Gimp; Gimp::on_net(\&net); sub net { # The net() procedure is called when the script is started # by the Perl network server extension, rather than # being started directly by the Gimp. my ($blurb, $help, $author, $copyright, $date, $type, $args, $rvals); # Get the names of all the procedures from the PDB my @procnames = Gimp->procedural_db_query(qw(.* .* .* .* .* .* .*)); shift @procnames; # discard the number returned # Now iterate through the names, get the 8 info fields # for each and print out the name, author, and help fields foreach my $name (@procnames) { ($blurb, $help, $author, $copyright, $date, $type, $args, $rvals) = Gimp->procedural_db_proc_info($name); print "$name\n"; print '-' x length($name); print "\nAuthor: $author\nWhat it does: $help\n\n"; } } exit main;