Changeset 15872 for gsdl/trunk/perllib/plugins/GMLPlugin.pm
- Timestamp:
- 2008-06-05T09:29:32+12:00 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
gsdl/trunk/perllib/plugins/GMLPlugin.pm
r15865 r15872 1 1 ########################################################################### 2 2 # 3 # GMLPlug .pm --3 # GMLPlugin.pm -- 4 4 # A component of the Greenstone digital library software 5 5 # from the New Zealand Digital Library Project at the … … 29 29 # 12/05/02 Added usage datastructure - John Thompson 30 30 31 package GMLPlug ;32 33 use Bas Plug;31 package GMLPlugin; 32 33 use BasePlugin; 34 34 use util; 35 35 use doc; … … 39 39 40 40 sub BEGIN { 41 @GMLPlug ::ISA = ('BasPlug');41 @GMLPlugin::ISA = ('BasePlugin'); 42 42 } 43 43 44 44 my $arguments = 45 45 [ { 'name' => "process_exp", 46 'desc' => "{Bas Plug.process_exp}",46 'desc' => "{BasePlugin.process_exp}", 47 47 'type' => "regexp", 48 48 'deft' => &get_default_process_exp() } 49 49 ]; 50 50 51 my $options = { 'name' => "GMLPlug ",52 'desc' => "{GMLPlug .desc}",51 my $options = { 'name' => "GMLPlugin", 52 'desc' => "{GMLPlugin.desc}", 53 53 'abstract' => "no", 54 54 'inherits' => "yes", … … 60 60 push(@$pluginlist, $class); 61 61 62 if(defined $arguments){ push(@{$hashArgOptLists->{"ArgList"}},@{$arguments});}63 if(defined $options) { push(@{$hashArgOptLists->{"OptList"}},$options)};64 65 my $self = new Bas Plug($pluginlist, $inputargs, $hashArgOptLists);62 push(@{$hashArgOptLists->{"ArgList"}},@{$arguments}); 63 push(@{$hashArgOptLists->{"OptList"}},$options); 64 65 my $self = new BasePlugin($pluginlist, $inputargs, $hashArgOptLists); 66 66 67 67 return bless $self, $class; … … 88 88 $file =~ s/^[\/\\]+//; # $file often begins with / so we'll tidy it up 89 89 90 print STDERR "<Processing n='$file' p='GMLPlug '>\n" if ($gli);91 print $outhandle "GMLPlug : processing $file\n";90 print STDERR "<Processing n='$file' p='GMLPlugin'>\n" if ($gli); 91 print $outhandle "GMLPlugin: processing $file\n"; 92 92 93 93 my $parent_dir = $file; … … 99 99 print STDERR "<ProcessingError n='$file' r='Could not read $filename'>\n"; 100 100 } 101 print $outhandle "GMLPlug ::read - couldn't read $filename\n";101 print $outhandle "GMLPlugin::read - couldn't read $filename\n"; 102 102 return -1; 103 103 } … … 130 130 if ($gml =~ /^\s*([^>]*)>(.*)$/so) { 131 131 $tags = $1 if defined $1; 132 $text = &GMLPlug ::_unescape_text($2);132 $text = &GMLPlugin::_unescape_text($2); 133 133 134 134 } else { 135 print $outhandle "GMLPlug ::read - error in file $filename\n";135 print $outhandle "GMLPlugin::read - error in file $filename\n"; 136 136 print $outhandle "text: \"$gml\"\n"; 137 137 last; … … 158 158 # could be stored as either attributes or .... 159 159 while ((defined $tags) && ($tags =~ s/^\s*(\S+)=\"([^\"]*)\"//o)) { 160 $doc_obj->add_utf8_metadata($section, $1, &GMLPlug ::_unescape_text($2))160 $doc_obj->add_utf8_metadata($section, $1, &GMLPlugin::_unescape_text($2)) 161 161 if (defined $1 and defined $2); 162 162 … … 183 183 $tagname =~ s/^&\#47;/\//; 184 184 185 $doc_obj->add_utf8_metadata($section, $tagname, &GMLPlug ::_unescape_text($tagvalue));185 $doc_obj->add_utf8_metadata($section, $tagname, &GMLPlugin::_unescape_text($tagvalue)); 186 186 } 187 187 }
Note:
See TracChangeset
for help on using the changeset viewer.