Changeset 17738 for gsdl/trunk/perllib/plugins/DirectoryPlugin.pm
- Timestamp:
- 2008-11-06T13:50:44+13:00 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
gsdl/trunk/perllib/plugins/DirectoryPlugin.pm
r17543 r17738 30 30 package DirectoryPlugin; 31 31 32 use AbstractPlugin;32 use PrintInfo; 33 33 use plugin; 34 34 use util; … … 43 43 44 44 BEGIN { 45 @DirectoryPlugin::ISA = (' AbstractPlugin');45 @DirectoryPlugin::ISA = ('PrintInfo'); 46 46 } 47 47 … … 77 77 push(@{$hashArgOptLists->{"OptList"}},$options); 78 78 79 my $self = new AbstractPlugin($pluginlist, $inputargs, $hashArgOptLists);79 my $self = new PrintInfo($pluginlist, $inputargs, $hashArgOptLists); 80 80 81 81 if ($self->{'info_only'}) { … … 89 89 } 90 90 91 $self->{'num_processed'} = 0; 92 $self->{'num_not_processed'} = 0; 93 $self->{'num_blocked'} = 0; 94 $self->{'num_archives'} = 0; 95 91 96 $self->{'subdir_extrametakeys'} = {}; 92 97 … … 94 99 } 95 100 101 # called once, at the start of processing 102 sub init { 103 my $self = shift (@_); 104 my ($verbosity, $outhandle, $failhandle) = @_; 105 106 # verbosity is passed through from the processor 107 $self->{'verbosity'} = $verbosity; 108 109 # as are the outhandle and failhandle 110 $self->{'outhandle'} = $outhandle if defined $outhandle; 111 $self->{'failhandle'} = $failhandle; 112 113 } 114 115 # called once, after all passes have finished 116 sub deinit { 117 my ($self) = @_; 118 119 } 120 121 # called at the beginning of each plugin pass (import has one, building has many) 96 122 sub begin { 97 123 my $self = shift (@_); … … 111 137 } 112 138 } 113 114 #$self->SUPER::begin($pluginfo, $base_dir, $processor, $maxdocs); 115 } 116 139 } 140 141 # called at the end of each plugin pass 117 142 sub end { 118 119 } 120 121 sub deinit { 122 123 } 143 my ($self) = shift (@_); 144 145 } 146 147 148 # called if we are doing incremental building 149 sub set_incremental { 150 my $self = shift(@_); 151 my ($incremental) = @_; 152 153 $self->{'incremental'} = $incremental; 154 } 155 124 156 # return 1 if this class might recurse using $pluginfo 125 157 sub is_recursive { … … 284 316 285 317 } 318 319 # We don't do metadata_read 320 sub metadata_read { 321 my $self = shift (@_); 322 my ($pluginfo, $base_dir, $file, $block_hash, $extrametakeys, $extrametadata, $processor, $maxdocs, $gli) = @_; 323 324 return undef; 325 } 326 327 286 328 # return number of files processed, undef if can't process 287 329 # Note that $base_dir might be "" and that $file might … … 551 593 } 552 594 595 sub compile_stats { 596 my $self = shift(@_); 597 my ($stats) = @_; 598 } 599 553 600 1;
Note:
See TracChangeset
for help on using the changeset viewer.