Index: /trunk/gsdl/perllib/classify.pm
===================================================================
--- /trunk/gsdl/perllib/classify.pm	(revision 10217)
+++ /trunk/gsdl/perllib/classify.pm	(revision 10218)
@@ -58,6 +58,5 @@
     my ($classobj);
     my $options = "-gsdlinfo";
-
-    eval ("\$classobj = new \$classifier($options)");
+    eval ("\$classobj = new \$classifier([],[$options])");
     die "$@" if $@;
 
@@ -112,5 +111,6 @@
 	my $options .= join (",", @newoptions);
 
-	eval ("\$classobj = new \$classname($options)");
+
+	eval ("\$classobj = new \$classname([],[$options])");
 	die "$@" if $@;
 
Index: /trunk/gsdl/perllib/classify/AZCompactList.pm
===================================================================
--- /trunk/gsdl/perllib/classify/AZCompactList.pm	(revision 10217)
+++ /trunk/gsdl/perllib/classify/AZCompactList.pm	(revision 10218)
@@ -62,5 +62,5 @@
 	'desc' => "{AZCompactList.sort}",
 	'type' => "string",
-	'deft' => "Title",
+#	'deft' => "Title",
 	'reqd' => "no" },
       { 'name' => "removeprefix",
@@ -121,52 +121,14 @@
 
 sub new {
-    my $class = shift (@_);
-    my $self = new BasClas($class, @_);
-
-    # 14-05-02 To allow for proper inheritance of arguments - John Thompson
-    my $option_list = $self->{'option_list'};
-    push( @{$option_list}, $options );
-
-    if ($self->{'info_only'}) {
-	# created from classinfo.pl - don't need to parse the arguments
-	return bless $self, $class;
-    }
-
-    my ($metaname, $title, $removeprefix, $removesuffix);
-    my $sortname = "Title";
-    my $mingroup = 2;
-    my $minnesting = 20;
-    my $mincompact = 10;
-    my $maxcompact = 30;
-    my $doclevel = "top";
-    my $firstvalueonly = 0;
-    my $allvalues = 0;
-    my $freqsort = 0;
-    my $recopt   = undef;
-
-    if (!parsargv::parse(\@_, 
-			 q^metadata/.*/^, \$metaname,
-			 q^buttonname/.*/^, \$title,
-			 q^sort/.*/^, \$sortname,
-			 q^removeprefix/.*/^, \$removeprefix,
-			 q^removesuffix/.*/^, \$removesuffix,
-			 q^mingroup/.*/2^, \$mingroup,
-			 q^minnesting/.*/20^, \$minnesting,
-			 q^mincompact/.*/10^, \$mincompact,
-			 q^maxcompact/.*/30^, \$maxcompact,
-			 q^doclevel/.*/top^, \$doclevel,
-			 q^firstvalueonly^, \$firstvalueonly,
-			 q^allvalues^, \$allvalues,
-			 q^freqsort/.*/0^, \$freqsort,
-			 q^recopt/.*/-1^, \$recopt,  # Used in nested metadata such as -metadata Year/Organisation
-
-			 "allow_extra_options")) {
-	
-	print STDERR "\nIncorrect options passed to $class, check your collect.cfg file\n";
-	$self->print_txt_usage("");  # Use default resource bundle
-	die "\n";
-    }
-
-    if (!defined($metaname)) {
+    my ($class) = shift (@_);
+    my ($pluginlist,$inputargs,$hashArgOptLists) = @_;
+    push(@$pluginlist, $class);
+
+    if(defined $arguments){ push(@{$hashArgOptLists->{"ArgList"}},@{$arguments});}
+    if(defined $options) { push(@{$hashArgOptLists->{"OptList"}},$options)};
+
+    my $self = (defined $hashArgOptLists)? new BasClas($pluginlist,$inputargs,$hashArgOptLists): new BasClas($pluginlist,$inputargs);
+
+    if (!$self->{"metadata"}) {
 	my $outhandle = $self->{'outhandle'};
 	print $outhandle "AZCompactList Error: required option -metadata not supplied\n";
@@ -175,7 +137,5 @@
     }
 
-    $title = $self->generate_title_from_metadata($metaname) unless ($title);
-    #$title = $metaname unless ($title);
-
+    # Manually set $self parameters.
     $self->{'list'} = {};
     $self->{'listmetavalue'} = {};
@@ -183,42 +143,19 @@
     $self->{'reclassify'} = {};
     $self->{'reclassifylist'} = {};
-    $self->{'metaname'} = $metaname;
-    $self->{'title'} = "$title";     # title for the titlebar.
-    $self->{'sortname'} = $sortname;
-
-    if (defined($removeprefix) && $removeprefix) {
-	$removeprefix =~ s/^\^//; # don't need a leading ^
-	$self->{'removeprefix'} = $removeprefix;
-    }
-    if (defined($removesuffix) && $removesuffix) {
-	$removesuffix =~ s/\$$//; # don't need a trailing $
-	$self->{'removesuffix'} = $removesuffix;
-    }
-    $self->{'mingroup'} = $mingroup;
-    $self->{'minnesting'} = $minnesting;
-    $self->{'mincompact'} = $mincompact;
-    $self->{'maxcompact'} = $maxcompact;
-    $self->{'doclevel'} = $doclevel;
-
-    if ($firstvalueonly != 0) {
-	$firstvalueonly = 1;
-    }
-    $self->{'firstvalueonly'} = $firstvalueonly;
-  
-    if ($allvalues != 0) {
-	$allvalues = 1;
-    }
-    $self->{'allvalues'} = $allvalues;
-    if ($freqsort != 0) {
-	$freqsort = 1;
-    }
-    $self->{'freqsort'} = $freqsort;
-
-    if ($recopt == -1) {
-	$recopt = undef; 
-    } else {
-	$recopt = "on";
-    }
-    $self->{'recopt'} = $recopt;
+
+    $self->{'buttonname'} = $self->generate_title_from_metadata($self->{'metadata'}) unless ($self->{'buttonname'});
+    
+    if (defined($self->{"removeprefix"}) && $self->{"removeprefix"}) {
+	$self->{"removeprefix"} =~ s/^\^//; # don't need a leading ^
+    }
+    if (defined($self->{"removesuffix"}) && $self->{"removesuffix"}) {
+	$self->{"removesuffix"} =~ s/\$$//; # don't need a trailing $
+    }
+	
+    $self->{'recopt'} = ($self->{'recopt'} == 0) ? undef : "on";
+
+    # Clean out the unused keys
+    if($self->{"removeprefix"} eq "") {delete $self->{"removeprefix"};}
+    if($self->{"removesuffix"} eq "") {delete $self->{"removesuffix"};}
 
     return bless $self, $class;
@@ -247,5 +184,5 @@
     my @sectionlist = ();
     my $topsection = $doc_obj->get_top_section();
-    my $metaname = $self->{'metaname'};
+    my $metaname = $self->{'metadata'};
     my $outhandle = $self->{'outhandle'};
 
@@ -317,5 +254,5 @@
 
 		my $formatted_metavalue =
-		  sorttools::format_metadata_for_sorting($self->{'metaname'},
+		  sorttools::format_metadata_for_sorting($self->{'metadata'},
 							 $metavalue, $doc_obj);
 		
@@ -338,5 +275,5 @@
 
 	# This is used in reclassify below for AZCompactSectionList
-	my $sortmeta = $doc_obj->get_metadata_element($thissection, $self->{'sortname'});
+	my $sortmeta = $doc_obj->get_metadata_element($thissection, $self->{'sort'});
 	$self->{'reclassify'}->{$full_doc_OID} = [$doc_obj,$sortmeta];
     }
@@ -413,5 +350,5 @@
     my $doclevel = $self->{'doclevel'};
     my $mingroup = $self->{'mingroup'};
-    my @metaname_list = split(/\/|\|/,$self->{'metaname'});
+    my @metaname_list = split(/\/|\|/,$self->{'metadata'});
     my $metaname = shift(@metaname_list);
     my $hierarchical = 0;
@@ -433,15 +370,14 @@
 		# buttonname is also used for the node's title
 		push @args, ("-buttonname", "$metavalue");
-		push @args, ("-sort", $self->{'sortname'});
-
+		push @args, ("-sort", $self->{'sort'});
+
+		my $ptArgs = \@args;
 		if ($doclevel =~ m/^top(level)?/i)
 		{
-		    eval ("\$listclassobj = new List(\@args)"); 
-		    warn $@ if $@;
+		    eval ("\$listclassobj = new List([],\$ptArgs)"); 
 		}
 		else
 		{
-		    eval ("\$listclassobj = new SectionList(\@args)"); 
-		    warn $@ if $@;
+		    eval ("\$listclassobj = new SectionList([],\$ptArgs)");
 		}
 	    }
@@ -453,5 +389,5 @@
 		# buttonname is also used for the node's title
 		push @args, ("-buttonname", "$metavalue");
-		push @args, ("-sort", $self->{'sortname'});
+		push @args, ("-sort", $self->{'sort'});
 
 		if (defined $self->{'removeprefix'}) {
@@ -466,7 +402,8 @@
 		push @args, "-recopt ";
 
-		eval ("\$listclassobj = new AZCompactList(\@args)");
-		warn $@ if $@;
-	    }
+		my $ptArgs = \@args;
+		eval ("\$listclassobj = new AZCompactList([],\$ptArgs)");
+	    }
+	    
 	    if ($@) {
 		print $outhandle "$@";
@@ -493,5 +430,5 @@
 		}
 
-		$formatted_node = &sorttools::format_metadata_for_sorting($self->{'metaname'}, $formatted_node); 
+		$formatted_node = &sorttools::format_metadata_for_sorting($self->{'metadata'}, $formatted_node); 
 
 		# In case our formatted string is empty...
@@ -671,5 +608,4 @@
     my $self = shift (@_);
     my ($title, $childtype, $metaname, $thistype) = @_;
-
     # organise into classification structure
     my %classifyinfo = ('childtype'=>$childtype,
@@ -694,5 +630,5 @@
 
     # top level
-    my @metanames = split(/\/|\|/,$self->{'metaname'});
+    my @metanames = split(/\/|\|/,$self->{'metadata'});
     my $metaname = shift(@metanames);
 
@@ -700,9 +636,8 @@
     $childtype = "VList" if (scalar (@$classlistref) <= $self->{'minnesting'});
 
+    my $title = $self->{'buttonname'}; # should always be defined by now.
     my $classifyinfo;
     if (!defined($self->{'recopt'}))
     {
-	my $title = $self->{'title'}; # should always be defined by now....
-	$title = $metaname unless defined $title; 
 	$classifyinfo 
 	    = $self->get_entry ($title, $childtype, $metaname, "Invisible");
@@ -710,5 +645,4 @@
     else
     {
-	my $title = $self->{'title'};
 	$classifyinfo 
 	    = $self->get_entry ($title, $childtype, $metaname, "VList");
Index: /trunk/gsdl/perllib/classify/AZCompactSectionList.pm
===================================================================
--- /trunk/gsdl/perllib/classify/AZCompactSectionList.pm	(revision 10217)
+++ /trunk/gsdl/perllib/classify/AZCompactSectionList.pm	(revision 10218)
@@ -23,15 +23,12 @@
 
 sub new {
-    my $class = shift (@_);
-    my $self = new AZCompactList($class, @_);
-
-    # 14-05-02 To allow for proper inheritance of arguments - John Thompson
-    my $option_list = $self->{'option_list'};
-    push( @{$option_list}, $options );
-
-    #if ($self->{'info_only'}) {
-	# created from classinfo.pl - don't need to parse the arguments
-    #return bless $self, $class;
-    #}
+    my ($class) = shift (@_);
+    my ($classifierslist,$inputargs,$hashArgOptLists) = @_;
+    push(@$classifierslist, $class);
+
+    if(defined $arguments){ push(@{$hashArgOptLists->{"ArgList"}},@{$arguments});}
+    if(defined $options) { push(@{$hashArgOptLists->{"OptList"}},$options)};
+
+    my $self = (defined $hashArgOptLists)? new AZCompactList($classifierslist,$inputargs,$hashArgOptLists): new AZCompactList($classifierslist,$inputargs);
 
     return bless $self, $class;
@@ -117,9 +114,10 @@
 # buttonname is also used for the node's title
 		push @args, ("-buttonname", "$metavalue");
-		push @args, ("-sort", $self->{'sortname'});
-
+		push @args, ("-sort", $self->{'sort'});
+
+		my $ptArgs = \@args;
 		if ($doclevel =~ m/^top(level)?/i)
 		{
-		    eval ("\$listclassobj = new List(\@args)"); warn $@ if $@;
+		    eval ("\$listclassobj = new List([],\$ptArgs)"); warn $@ if $@;
 		}
 		else
@@ -127,5 +125,5 @@
 		    # SECTIONFIX?
 		    #eval ("\$listclassobj = new SectionList($args)");
-		    eval ("\$listclassobj = new SectionList(\@args)");
+		    eval ("\$listclassobj = new SectionList([],\$ptArgs)");
 		}
 	    }
@@ -143,5 +141,6 @@
 		# SECTIONFIX?
 		#eval ("\$listclassobj = new AZCompactList($args)");
-		eval ("\$listclassobj = new AZCompactList(\@args)");
+		my $ptArgs = \@args;
+		eval ("\$listclassobj = new AZCompactList([],\$ptArgs)");
 	    }
 	    if ($@) {
Index: /trunk/gsdl/perllib/classify/AZList.pm
===================================================================
--- /trunk/gsdl/perllib/classify/AZList.pm	(revision 10217)
+++ /trunk/gsdl/perllib/classify/AZList.pm	(revision 10218)
@@ -67,29 +67,14 @@
 
 sub new {
-    my $class = shift (@_);
-    my $self = new BasClas($class, @_);
-    
-    my $option_list = $self->{'option_list'};
-    push( @{$option_list}, $options );
-    
-    if ($self->{'info_only'}) {
-	# created from classinfo.pl - don't need to parse the arguments
-	return bless $self, $class;
-    }
-    my ($metadata, $title, $removeprefix, $removesuffix);
-    
-    if (!parsargv::parse(\@_, 
-			 q^metadata/.*/^, \$metadata,
-			 q^buttonname/.*/^, \$title,
-			 q^removeprefix/.*/^, \$removeprefix,
-			 q^removesuffix/.*/^, \$removesuffix,
-			 "allow_extra_options")) {
-	
-	print STDERR "\nIncorrect options passed to $class, check your collect.cfg file\n";
-	$self->print_txt_usage("");  # Use default resource bundle
-	die "\n";
-    }
-
-    if (!$metadata) {
+    my ($class) = shift (@_);
+    my ($classifierslist,$inputargs,$hashArgOptLists) = @_;
+    push(@$classifierslist, $class);
+
+    if(defined $arguments){ push(@{$hashArgOptLists->{"ArgList"}},@{$arguments});}
+    if(defined $options) { push(@{$hashArgOptLists->{"OptList"}},$options)};
+
+    my $self = (defined $hashArgOptLists)? new BasClas($classifierslist,$inputargs,$hashArgOptLists): new BasClas($classifierslist,$inputargs);
+
+    if (!$self->{"metadata"}) {
 	print STDERR "AZList Error: required option -metadata not supplied \n";
 	$self->print_txt_usage("");  # Use default resource bundle
@@ -97,22 +82,27 @@
 	die "AZList Error: required option -metadata not supplied\n";
     }
-    
-    my @meta_list = split(/,/, $metadata);
-    #my $meta1 = $meta_list[0];
-
-    #$title = $meta1 unless ($title);
-    $title = $self->generate_title_from_metadata($metadata) unless ($title);
+        
+    # Manually set $self parameters.
     $self->{'list'} = {};
+
+    # Transfer value from Auto Parsing to the variavle name that used in previous GreenStone.
+    my @meta_list = split(/,/, $self->{"metadata"});
     $self->{'meta_list'} = \@meta_list;
-    $self->{'title'} = $title;
-    
-    if (defined($removeprefix) && $removeprefix) {
-	$removeprefix =~ s/^\^//; # don't need a leading ^
-	$self->{'removeprefix'} = $removeprefix;
-    }
-    if (defined($removesuffix) && $removesuffix) {
-	$removesuffix =~ s/\$$//; # don't need a trailing $
-	$self->{'removesuffix'} = $removesuffix;
-    }
+
+    $self->{'buttonname'} = $self->generate_title_from_metadata($self->{'metadata'}) unless ($self->{'buttonname'});
+
+    # Further setup 
+    if (defined($self->{"removeprefix"}) && $self->{"removeprefix"}) {
+	$self->{"removeprefix"} =~ s/^\^//; # don't need a leading ^
+    }
+    if (defined($self->{"removesuffix"}) && $self->{"removesuffix"}) {
+	$self->{"removesuffix"} =~ s/\$$//; # don't need a trailing $
+    }
+
+    # Clean out the unused keys
+    delete $self->{"metadata"}; # Delete this key
+
+    if($self->{"removeprefix"} eq "") {delete $self->{"removeprefix"};}
+    if($self->{"removesuffix"} eq "") {delete $self->{"removesuffix"};}
 
     return bless $self, $class;
@@ -233,5 +223,5 @@
     my $childtype = "HList";
     if (scalar (@$classlistref) <= 39) {$childtype = "VList";}
-    my $classifyinfo = $self->get_entry ($self->{'title'}, $childtype, "Invisible");
+    my $classifyinfo = $self->get_entry ($self->{'buttonname'}, $childtype, "Invisible");
 
     # don't need to do any splitting if there are less than 39 (max + min -1) classifications
Index: /trunk/gsdl/perllib/classify/AZSectionList.pm
===================================================================
--- /trunk/gsdl/perllib/classify/AZSectionList.pm	(revision 10217)
+++ /trunk/gsdl/perllib/classify/AZSectionList.pm	(revision 10218)
@@ -52,15 +52,12 @@
 
 sub new {
-    my $class = shift (@_);
-    my $self = new AZList($class, @_);
+    my ($class) = shift (@_);
+    my ($classifierslist,$inputargs,$hashArgOptLists) = @_;
+    push(@$classifierslist, $class);
 
-    # 14-05-02 To allow for proper inheritance of arguments - John Thompson
-    my $option_list = $self->{'option_list'};
-    push( @{$option_list}, $options );
-    
-    #if ($self->{'info_only'}) {
-	# created from classinfo.pl - don't need to parse the arguments
-    #	return bless $self, $class;
-    #}
+    if(defined $arguments){ push(@{$hashArgOptLists->{"ArgList"}},@{$arguments});}
+    if(defined $options) { push(@{$hashArgOptLists->{"OptList"}},$options)};
+
+    my $self = (defined $hashArgOptLists)? new AZList($classifierslist,$inputargs,$hashArgOptLists): new AZList($classifierslist,$inputargs);
 
     return bless $self, $class;
Index: /trunk/gsdl/perllib/classify/AllList.pm
===================================================================
--- /trunk/gsdl/perllib/classify/AllList.pm	(revision 10217)
+++ /trunk/gsdl/perllib/classify/AllList.pm	(revision 10218)
@@ -15,9 +15,16 @@
 
 sub new {
-    my $class = shift (@_);
-    my $self  = new BasClas($class, @_);
+    my ($class) = shift (@_);
+    my ($classifierslist,$inputargs,$hashArgOptLists) = @_;
+    push(@$classifierslist, $class);
 
+    if(defined $arguments){ push(@{$hashArgOptLists->{"ArgList"}},@{$arguments});}
+    if(defined $options) { push(@{$hashArgOptLists->{"OptList"}},$options)};
+
+    my $self = (defined $hashArgOptLists)? new BasClas($classifierslist,$inputargs,$hashArgOptLists): new BasClas($classifierslist,$inputargs);
+
+    # Manually set $self parameters.
     $self->{'list'} = [];
-    $self->{'title'} = "All Documents";
+    $self->{'buttonname'} = "All Documents";
 
     return bless $self, $class;
@@ -44,5 +51,5 @@
 
     my %classifyinfo = ('childtype'   =>'VList',
-			'Title'       =>$self->{'title'},
+			'Title'       =>$self->{'buttonname'},
 			'contains'    =>[],
 			'classifyOID' =>"oai");
@@ -56,5 +63,5 @@
        
 	my %tempinfo=('childtype'=>'VList',
-		      'Title'=>$self->{'title'},
+		      'Title'=>$self->{'buttonname'},
 		      'classifyOID' =>"oai.$seqNo",
 		      'contains'    =>[]);
Index: /trunk/gsdl/perllib/classify/BasClas.pm
===================================================================
--- /trunk/gsdl/perllib/classify/BasClas.pm	(revision 10217)
+++ /trunk/gsdl/perllib/classify/BasClas.pm	(revision 10218)
@@ -56,5 +56,5 @@
 use gsprintf;
 use printusage;
-
+use parse2;
 
 my $arguments = 
@@ -67,9 +67,10 @@
 	'type' => "string",
 	'deft' => "STDERR" },
-#      { 'name' => "verbosity",
-#	'desc' => "{BasClas.verbosity}",
+      { 'name' => "verbosity",
+	'desc' => "{BasClas.verbosity}",
 #	'type' => "enum",
-#	'deft' => "2",
-#	'reqd' => "no" } ];
+	'type' => "int",
+	'deft' => "2",
+	'reqd' => "no" },
 #      { 'name' => "ignore_namespace",
 #	'desc' => "{BasClas.ignore_namespace}",
@@ -214,35 +215,61 @@
 
 sub new {
-    my $class = shift (@_);
-    my $name = shift (@_);
-
+    my ($class) = shift (@_);
+    my ($classifierslist,$args,,$hashArgOptLists) = @_;
+    push(@$classifierslist, $class);
+    my $classifier_name = (defined $classifierslist->[0]) ? $classifierslist->[0] : $class;
+    print STDERR "new $classifier_name\n";
+    if(defined $arguments){ push(@{$hashArgOptLists->{"ArgList"}},@{$arguments});}
+    if(defined $options) { push(@{$hashArgOptLists->{"OptList"}},$options)};
+
+
+    # Manually set $self parameters.
     my $self = {};
-
     $self->{'outhandle'} = STDERR;
     $self->{'idnum'} = -1;
-    
-    $self->{'option_list'} = [ $options ];
-    my $gsdlinfo;
-
-    # general options available to all classifiers
-    if (!parsargv::parse(\@_,
-			 q^builddir/.*/^, \$self->{'builddir'},
-			 q^outhandle/.*/STDERR^, \$self->{'outhandle'},
-			 q^verbosity/\d/2^, \$self->{'verbosity'},
-			 q^ignore_namespace^, \$self->{'ignore_namespace'},
-			 q^gsdlinfo^, \$gsdlinfo,
-			 "allow_extra_options")) {
-
-	&gsprintf(STDERR, "\n{BasClas.bad_general_option}\n", $name);
-	$self->print_txt_usage("");  # Use default resource bundle
-	die "\n";
-    }
-
-    if ($gsdlinfo) {
-	# created from classinfo.pl - set this so subclasses don't need to 
-	# parse the arguments
-	$self->{'info_only'} = 1;
-    }
-    return bless $self, $class;
+    $self->{'option_list'} = $hashArgOptLists->{"OptList"};
+    $self->{"info_only"} = 0;
+
+    # Check if gsdlinfo is in the argument list or not.  
+    foreach $strArg (@{$args})
+    {
+	if($strArg eq "gsdlinfo")
+	{
+	    $self->{"info_only"} = 1;
+	    last;
+	}
+    }
+
+    # If gsdlinfo is not in the argument list, process the argument normally.
+    if($self->{"info_only"} == 0)
+    {
+	my $blnParseFailed = "false";
+	# general options available to all plugins
+	if(!parse2::parse($args,$hashArgOptLists->{"ArgList"},$self))
+	{
+	    $blnParseFailed = "true"; 
+	}
+	
+	# If the parsing wasn't successful, then print out the text usage of this classifier. 
+	my $classTempClass = bless $self, $class;
+	if($blnParseFailed eq "true")
+	{
+	    &gsprintf(STDERR, "\n{BasClas.bad_general_option}\n", $classifier_name);
+	    $classTempClass->print_txt_usage("");  # Use default resource bundle
+	    die "\n";
+	}
+	else
+	{
+	    delete $self->{"info_only"};
+	    return $classTempClass;
+	}
+    }
+
+    # If gsdlinfo is in the argument list, do not perform any parsing.
+    else
+    {	
+	delete $self->{"info_only"};
+	return bless $self, $class;
+    }
 }
 
Index: /trunk/gsdl/perllib/classify/Browse.pm
===================================================================
--- /trunk/gsdl/perllib/classify/Browse.pm	(revision 10217)
+++ /trunk/gsdl/perllib/classify/Browse.pm	(revision 10218)
@@ -42,20 +42,16 @@
 
 sub new {
-    my $class = shift (@_);
-    my $self = new BasClas($class, @_);
- 
-    # 14-05-02 To allow for proper inheritance of arguments - John Thompson
-    my $option_list = $self->{'option_list'};
-    push( @{$option_list}, $options );  
+    my ($class) = shift (@_);
+    my ($classifierslist,$inputargs,$hashArgOptLists) = @_;
+    push(@$classifierslist, $class);
 
-    if ($self->{'info_only'}) {
-	# created from classinfo.pl - don't need to parse the arguments
-	return bless $self, $class;
-    }
+    if(defined $arguments){ push(@{$hashArgOptLists->{"ArgList"}},@{$arguments});}
+    if(defined $options) { push(@{$hashArgOptLists->{"OptList"}},$options)};
 
-    # classifier information
-    $self->{'collection'} = $ENV{'GSDLCOLLECTION'};
+    my $self = (defined $hashArgOptLists)? new BasClas($classifierslist,$inputargs,$hashArgOptLists): new BasClas($classifierslist,$inputargs);
 
-    $self->{'title'} = "Browse";
+    # Manually set $self parameters.
+    $self->{'collection'} = $ENV{'GSDLCOLLECTION'}; # classifier information
+    $self->{'buttonname'} = "Browse";
 
     return bless $self, $class;
@@ -80,5 +76,5 @@
     # use to create macros when the Phind classifier document is displayed.
     my %classifyinfo = ('thistype'=>'Invisible', 
-                        'Title'=>$self->{'title'},
+                        'Title'=>$self->{'buttonname'},
 			'contains'=>[]);
     
Index: /trunk/gsdl/perllib/classify/Collage.pm
===================================================================
--- /trunk/gsdl/perllib/classify/Collage.pm	(revision 10217)
+++ /trunk/gsdl/perllib/classify/Collage.pm	(revision 10218)
@@ -106,54 +106,18 @@
 
 sub new {
-    my $class = shift (@_);
-    my $self = new BasClas($class, @_);
-
-    my $option_list = $self->{'option_list'};
-    push( @{$option_list}, $options );
-
-    if ($self->{'info_only'}) {
-	# created from classinfo.pl - don't need to parse the arguments
-	return bless $self, $class;
-    }   
-
-    my ($title, $geometry, $verbosity, $maxDepth, $imageType, $bgcolor, $refreshDelay, $isJava2, $caption, $maxDisplay, $maxDownloads, $list);
-
-    if (!parsargv::parse(\@_, 
-			 q^buttonname/.*/Collage^, \$title,
-			 q^geometry/.*/600x300^, \$geometry,
-			 q^verbosity/.*/3^, \$verbosity,
-			 q^maxDepth/.*/500^, \$maxDepth,
-#			 q^maxDownloads/.*/^, \$maxDownloads,
-			 q^maxDisplay/.*/25^, \$maxDisplay,
-			 q^imageType/.*/.jpg%.png^, \$imageType,
-			 q^bgcolor/.*/\#96c29a^, \$bgcolor,
-			 q^refreshDelay/.*/1200^, \$refreshDelay,
-			 q^isJava2/.*/auto^, \$isJava2,
-			 q^imageMustNotHave/.*/hl=\%x=\%gt=\%gc=\%.pr^, \$imageMustNotHave,
-			 q^caption/.*/ ^, \$caption,
-			 "allow_extra_options")) {
-	
-	print STDERR "\nIncorrect options passed to $class, check your collect.cfg file\n";
-	$self->print_txt_usage("");  # Use default resource bundle
-	die "\n";
-    }
-
-    if (!$title) {
-	$title = 'Collage';
-    }
-
-    $self->{'list'} = $list;
-    $self->{'title'} = $title;
-    $self->{'geometry'} = $geometry;
-    $self->{'verbosity'} = $verbosity;
-    $self->{'maxDepth'} = $maxDepth;
-    $self->{'maxDownloads'} = $maxDownloads;
-    $self->{'maxDisplay'} = $maxDisplay;
-    $self->{'imageType'} = $imageType;
-    $self->{'bgcolor'} = $bgcolor;
-    $self->{'refreshDelay'} = $refreshDelay;
-    $self->{'isJava2'} = $isJava2;
-#    $self->{'imageMustNotHave'} = $imageMustNotHave;
-    $self->{'caption'} = $caption;
+    my ($class) = shift (@_);
+    my ($classifierslist,$inputargs,$hashArgOptLists) = @_;
+    push(@$classifierslist, $class);
+
+    if(defined $arguments){ push(@{$hashArgOptLists->{"ArgList"}},@{$arguments});}
+    if(defined $options) { push(@{$hashArgOptLists->{"OptList"}},$options)};
+
+    my $self = (defined $hashArgOptLists)? new BasClas($classifierslist,$inputargs,$hashArgOptLists): new BasClas($classifierslist,$inputargs);
+
+    # Manually set $self parameters.
+    $self->{'list'} = {};
+    print STDERR "buttonnmae = $buttonname\n";
+    $self->{'buttonname'} = 'Collage' unless ($self->{'buttonname'});
+
     return bless $self, $class;
 }
@@ -206,8 +170,8 @@
 
     if ($verbosity>1) {
-	print $outhandle ("$self->{'title'}\n");
-    }
-
-    my $collage_head = $self->get_entry ($self->{'title'}, "Collage", "Invisible");
+	print $outhandle ("$self->{'buttonname'}\n");
+    }
+
+    my $collage_head = $self->get_entry ($self->{'buttonname'}, "Collage", "Invisible");
     my $collage_curr = $self->get_entry("Collage","VList");
     push (@{$collage_head->{'contains'}},$collage_curr);
Index: /trunk/gsdl/perllib/classify/DateList.pm
===================================================================
--- /trunk/gsdl/perllib/classify/DateList.pm	(revision 10217)
+++ /trunk/gsdl/perllib/classify/DateList.pm	(revision 10218)
@@ -79,39 +79,20 @@
 
 sub new {
-    my $class = shift (@_);
-    my $self = new BasClas($class, @_);
-
-    # 14-05-02 To allow for proper inheritance of arguments - John Thompson
-    my $option_list = $self->{'option_list'};
-    push( @{$option_list}, $options );
-
-    if ($self->{'info_only'}) {
-	# created from classinfo.pl - don't need to parse the arguments
-	return bless $self, $class;
-    }
-
+    my ($class) = shift (@_);
+    my ($classifierslist,$inputargs,$hashArgOptLists) = @_;
+    push(@$classifierslist, $class);
+
+    if(defined $arguments){ push(@{$hashArgOptLists->{"ArgList"}},@{$arguments});}
+    if(defined $options) { push(@{$hashArgOptLists->{"OptList"}},$options)};
+
+    my $self = (defined $hashArgOptLists)? new BasClas($classifierslist,$inputargs,$hashArgOptLists): new BasClas($classifierslist,$inputargs);
+
+    # Manually set $self parameters.
     $self->{'list'} = {};
 
-    my ($datemeta, $sortmeta);
-    $self->{'nogroup'}=0;
-    if (!parsargv::parse(\@_, 
-                         q^bymonth^, \$self->{'bymonth'},
-			 q^nogroup^, \$self->{'nogroup'},
-			 q^metadata/.*/^, \$datemeta,
-			 q^sort/.*/^, \$sortmeta,
-			 q^reverse_sort^, \$self->{'reverse_sort'},
-                         "allow_extra_options")) {
-	$self->print_txt_usage("");  # Use default resource bundle
-	die "\n";
-    }
-
-    if (!defined $datemeta || $datemeta eq "") {
-	$datemeta = "Date";
-    }
-    $self->{'datemeta'} = $datemeta;
-
-    if (defined $sortmeta && $sortmeta ne "") {
-	$self->{'sortmeta'} = $sortmeta;
-    }
+    if (!defined $self->{"metadata"} || $self->{"metadata"} eq "") {
+	$self->{'metadata'} = "Date";
+    }
+    
     return bless $self, $class;
 }
@@ -128,10 +109,10 @@
 
     my $doc_OID = $doc_obj->get_OID();
-    my $date = $doc_obj->get_metadata_element ($doc_obj->get_top_section(), $self->{'datemeta'});
+    my $date = $doc_obj->get_metadata_element ($doc_obj->get_top_section(), $self->{'metadata'});
     
     my $sort_other = "";
-    if (defined $self->{'sortmeta'} && $self->{'sortmeta'} ne "") {
-	$sort_other = $doc_obj->get_metadata_element ($doc_obj->get_top_section(), $self->{'sortmeta'});
-	$sort_other = &sorttools::format_metadata_for_sorting($self->{'sortmeta'}, $sort_other, $doc_obj);
+    if (defined $self->{'sort'} && $self->{'sort'} ne "") {
+	$sort_other = $doc_obj->get_metadata_element ($doc_obj->get_top_section(), $self->{'sort'});
+	$sort_other = &sorttools::format_metadata_for_sorting($self->{'sort'}, $sort_other, $doc_obj);
     }
     # if this document doesn't contain Date element we won't 
@@ -143,5 +124,4 @@
 	} 
 
-	
 	$self->{'list'}->{$doc_OID} = "$date$sort_other";
     }
@@ -169,5 +149,5 @@
 			'Title'=>$title,
 			'contains'=>[],
-			'mdtype'=>$self->{'datemeta'});
+			'mdtype'=>$self->{'metadata'});
     $classifyinfo{'thistype'} = $thistype 
 	if defined $thistype && $thistype =~ /\w/;
Index: /trunk/gsdl/perllib/classify/HFileHierarchy.pm
===================================================================
--- /trunk/gsdl/perllib/classify/HFileHierarchy.pm	(revision 10217)
+++ /trunk/gsdl/perllib/classify/HFileHierarchy.pm	(revision 10218)
@@ -51,9 +51,4 @@
 	'type' => "flag",
 	'reqd' => "no" },
-      { 'name' => "sort",
-	'desc' => "{Hierarchy.sort}",
-	'type' => "string",
-	'deft' => "{BasClas.metadata.deft}",
-	'reqd' => "no" },
       { 'name' => "hfile",
 	'desc' => "{Hierarchy.hfile}",
@@ -69,5 +64,5 @@
 	'desc' => "{Hierarchy.sort}",
 	'type' => "string",
-	'deft' => "{BasClas.metadata.deft}", 
+#	'deft' => "{BasClas.metadata.deft}", 
 	'reqd' => "no" },
       { 'name' => "reverse_sort",
@@ -82,5 +77,5 @@
 my $options = 
 { 	'name'     => "HFileHierarchy",
-	'desc'     => "{Hierarchy.desc}",
+	'desc'     => "{HFileHierarchy.desc}",
 	'abstract' => "yes",
 	'inherits' => "yes", 
@@ -89,37 +84,14 @@
 
 sub new {
-    my $class = shift (@_);
-    my $self = new BasClas($class, @_);
- 
-    my $option_list = $self->{'option_list'};
-    push( @{$option_list}, $options );
- 
-    if ($self->{'info_only'}) {
-	# created from classinfo.pl - don't need to parse the arguments
-	return bless $self, $class;
-    }
- 
-    my ($hfile, $metadata, $buttonname, $sortname, $reverse_sort, $title, 
-	$hlist_at_top);
-    my $firstvalueonly = 0;
-    my $allvalues = 0;
-    
-    if (!parsargv::parse(\@_, 
-			 q^metadata/.*/^, \$metadata,
-			 q^buttonname/.*/^, \$buttonname,
-			 q^firstvalueonly^, \$firstvalueonly,
-			 q^allvalues^, \$allvalues,
-			 q^sort/.*/^, \$sortname,
-			 q^reverse_sort^, \$reverse_sort,
-			 q^hfile/.*/^, \$hfile,
-			 q^hlist_at_top^, \$hlist_at_top,
-			 "allow_extra_options")) {
-	
-	print STDERR "\nIncorrect options passed to $class, check your collect.cfg file\n";
-	$self->print_txt_usage("");  # Use default resource bundle
-	die "\n";
-
-    }
-
+    my ($class) = shift (@_);
+    my ($classifierslist,$inputargs,$hashArgOptLists) = @_;
+    push(@$classifierslist, $class);
+
+    if(defined $arguments){ push(@{$hashArgOptLists->{"ArgList"}},@{$arguments});}
+    if(defined $options) { push(@{$hashArgOptLists->{"OptList"}},$options)};
+
+    my $self = (defined $hashArgOptLists)? new BasClas($classifierslist,$inputargs,$hashArgOptLists): new BasClas($classifierslist,$inputargs); 
+
+    my $metadata = $self->{'metadata'};
     if (!$metadata) {
 	print STDERR "$class Error: required option -metadata not supplied\n";
@@ -129,11 +101,15 @@
     }
     
-    $buttonname = $self->generate_title_from_metadata($metadata) unless ($buttonname);
-    $title = $buttonname;
-    $self->{'title'} = $title;
-
-    $self->{'metaname'} = $metadata;
+    $self->{'buttonname'} = $self->generate_title_from_metadata($metadata) unless ($self->{'buttonname'});
+
+    #$self->{'metaname'} = $metadata;
     my @meta_list = split(/,/, $metadata);
     $self->{'meta_list'} = \@meta_list;
+
+    print STDERR "sort = $self->{'sort'}\n";
+    # sort = undef in this case is the same as sort=nosort
+    if ($self->{'sort'} eq "nosort") {
+	$self->{'sort'} = undef;
+    }
 
     # sortname is handled a bit differently - kjdon
@@ -142,18 +118,21 @@
     # we have a list of possible metadata.
     # To get no sorting, set sortname = 'nosort'
-    if (!$sortname) {
-	if (defined ($metadata)) {
-	    $sortname = undef;
-	} else {
-	    $sortname = "nosort";
-	}
-    }
-    $self->{'sortname'} = $sortname;
-
-    if (defined $sortname && $reverse_sort) {
-	$self->{'reverse_sort'} = 1;
-    }
+    # we don't need to set it to undef if its not defined do we???
+
+#    if (!$self->{'sort'}) {
+#	if (defined ($metadata)) {
+#	    $sortname = undef;
+#	} else {
+#	    $sortname = "nosort";
+#	}
+#    }
+ #   $self->{'sortname'} = $sortname;
+
+    #if (defined $self->{'sort'} && $reverse_sort) {
+#	$self->{'reverse_sort'} = 1;
+ #   }
 	
-    if ($hfile) {
+    if ($self->{'hfile'}) {
+	my $hfile = $self->{'hfile'};
 	my $subjectfile;
 	$subjectfile = &util::filename_cat($ENV{'GSDLCOLLECTDIR'},"etc", $hfile);
@@ -177,9 +156,12 @@
     
 
-    $self->{'firstvalueonly'} = $firstvalueonly;
-    $self->{'allvalues'} = $allvalues;
-
-    $self->{'hlist_at_top'} = $hlist_at_top;
-
+   # $self->{'firstvalueonly'} = $firstvalueonly;
+   # $self->{'allvalues'} = $allvalues;
+
+    #$self->{'hlist_at_top'} = $hlist_at_top;
+
+    # Clean out the unused keys
+    delete $self->{'metadata'};
+    delete $self->{'hfile'};
     
     return bless $self, $class;
@@ -240,5 +222,5 @@
 	my $tempinfo = $self->get_OID_entry ($OID, $classifyinfo, $list->{$OID}->{'title'}, "VList");
 	
-	if (defined $self->{'sortname'}) {
+	if (defined $self->{'sort'}) {
 	    if ($self->{'reverse_sort'}) {
 		foreach $subOID (sort {$b->[1] cmp $a->[1];} @{$list->{$OID}->{'contents'}}) {
Index: /trunk/gsdl/perllib/classify/HTML.pm
===================================================================
--- /trunk/gsdl/perllib/classify/HTML.pm	(revision 10217)
+++ /trunk/gsdl/perllib/classify/HTML.pm	(revision 10218)
@@ -54,29 +54,14 @@
 
 sub new {
-    my $class = shift (@_);
-    my $self = new BasClas($class, @_);
+    my ($class) = shift (@_);
+    my ($classifierslist,$inputargs,$hashArgOptLists) = @_;
+    push(@$classifierslist, $class);
 
-    # 14-05-02 To allow for proper inheritance of arguments - John Thompson
-    my $option_list = $self->{'option_list'};
-    push( @{$option_list}, $options );
+    if(defined $arguments){ push(@{$hashArgOptLists->{"ArgList"}},@{$arguments});}
+    if(defined $options) { push(@{$hashArgOptLists->{"OptList"}},$options)};
 
-    if ($self->{'info_only'}) {
-	# created from classinfo.pl - don't need to parse the arguments
-	return bless $self, $class;
-    }
+    my $self = (defined $hashArgOptLists)? new BasClas($classifierslist,$inputargs,$hashArgOptLists): new BasClas($classifierslist,$inputargs);
 
-    my ($title, $url);
-    
-    if (!parsargv::parse(\@_, 
-			 q^url/.*/^, \$url,
-			 q^buttonname/.*/Browse^, \$title,
-			 "allow_extra_options")) {
-	
-	print STDERR "\nIncorrect options passed to $class, check your collect.cfg file\n";
-	$self->print_txt_usage("");  # Use default resource bundle
-	die "\n";
-    }
-
-    if (!$url) {
+    if (!$self->{'url'}) {
 	my $outhandle = $self->{'outhandle'};
 	print $outhandle "HTML Error: required option -url not supplied\n";
@@ -84,8 +69,4 @@
 	die "HTML Error: required option -url not supplied\n";
     }
-
-    $self->{'url'} = $url;
-    $self->{'title'} = $title;
-
     return bless $self, $class;
 }
@@ -107,5 +88,5 @@
     my %classifyinfo = ('thistype'=>'Invisible',
 			'childtype'=>'HTML',
-			'Title'=>$self->{'title'},
+			'Title'=>$self->{'buttonname'},
 			'contains'=>[]);
 
Index: /trunk/gsdl/perllib/classify/Hierarchy.pm
===================================================================
--- /trunk/gsdl/perllib/classify/Hierarchy.pm	(revision 10217)
+++ /trunk/gsdl/perllib/classify/Hierarchy.pm	(revision 10218)
@@ -43,15 +43,15 @@
 my $arguments = 
     [ { 'name' => "separator",
-	'desc' => "{AutoHierarchy.separator}",
+	'desc' => "{Hierarchy.separator}",
 	'type' => "regexp",
 	'deft' => "[\\\\\\\/|\\\\\\\|]",
 	'reqd' => "no" },
       { 'name' => "suppresslastlevel",
-	'desc' => "{AutoHierarchy.suppresslastlevel}",
+	'desc' => "{Hierarchy.suppresslastlevel}",
 	'type' => "flag",
 	'reqd' => "no" } ];
 
 my $options = { 'name'     => "Hierarchy",
-		'desc'     => "{AutoHierarchy.desc}",
+		'desc'     => "{Hierarchy.desc}",
 		'abstract' => "no",
 		'inherits' => "yes",
@@ -60,35 +60,12 @@
 
 sub new {
-    my $class = shift (@_);
-    my $self = new HFileHierarchy($class, @_);
-
-    # 14-05-02 To allow for proper inheritance of arguments - John Thompson
-    my $option_list = $self->{'option_list'};
-    push( @{$option_list}, $options );
-
-    if ($self->{'info_only'}) {
-	# created from classinfo.pl - don't need to parse the arguments
-	return bless $self, $class;
-    }
-
-    my $separator;
-    my $suppresslastlevel = 0;
-
-    if (!parsargv::parse(\@_, 
-			 q^separator/.*/^, \$separator,
-			 q^suppresslastlevel^, \$suppresslastlevel,
-			 "allow_extra_options")) {
-	
-	print STDERR "\nIncorrect options passed to $class, check your collect.cfg file\n";
-	$self->print_txt_usage("");  # Use default resource bundle
-	die "\n";
-    }
-
-    
-    if (!$separator) {
-	$separator = "[\\\/|\\\|]";
-    }
-    $self->{'separator'} = $separator;
-    $self->{'suppresslastlevel'} = $suppresslastlevel;
+    my ($class) = shift (@_);
+    my ($classifierslist,$inputargs,$hashArgOptLists) = @_;
+    push(@$classifierslist, $class);
+
+    if(defined $arguments){ push(@{$hashArgOptLists->{"ArgList"}},@{$arguments});}
+    if(defined $options) { push(@{$hashArgOptLists->{"OptList"}},$options)};
+
+    my $self = (defined $hashArgOptLists)? new HFileHierarchy($classifierslist,$inputargs,$hashArgOptLists): new HFileHierarchy($classifierslist,$inputargs); 
     
     # the hash that we use to build up the hierarchy
@@ -127,10 +104,12 @@
 	    push(@{$current_pos->{'docs'}}, $doc_OID);
 	} else {
-	    if (defined $sortmeta) {
-		# can you ever get the same doc twice in one classification??
-		$current_pos->{'docs'}->{$doc_OID} = $sortmeta;
-	    } else {
-		$current_pos->{'docs'}->{$doc_OID} = $metavalue;
-	    }
+	    $current_pos->{'docs'}->{$doc_OID} = $sortmeta;
+	    
+	    #if (defined $sortmeta) {
+	#	# can you ever get the same doc twice in one classification??
+	#	$current_pos->{'docs'}->{$doc_OID} = $sortmeta;
+	#    } else {
+	#	$current_pos->{'docs'}->{$doc_OID} = $metavalue;
+	#    }
 	}
     } # foreach metadata
@@ -146,8 +125,8 @@
     # are we sorting the list??
     my $nosort = 0;
-    if (defined $self->{'sortname'} && $self->{'sortname'} eq "nosort") {
+    if (!defined $self->{'sort'}) {
 	$nosort = 1;
     }
-
+    
     my $metavalues = [];
     # find all the metadata values
@@ -155,5 +134,5 @@
 	my $mvalues = $doc_obj->get_metadata($doc_obj->get_top_section(), $m);
 	next unless (@{$mvalues});
-	if ($self->{'onlyfirst'}) {
+	if ($self->{'firstvalueonly'}) {
 	    # we only want the first metadata value
 	    push (@$metavalues, $mvalues[0]);
@@ -169,12 +148,11 @@
     #check for a sort element other than our metadata
     my $sortmeta = undef;
-    if (!$nosort && defined $self->{'sortname'}) {
-	    
-	if ($self->{'sortname'} =~ /^filename$/i) {
+    if (!$nosort) {
+	if ($self->{'sort'} =~ /^filename$/i) {
 	    $sortmeta = $doc_obj->get_source_filename();
 	} else {
-	    $sortmeta = $doc_obj->get_metadata_element($doc_obj->get_top_section(), $self->{'sortname'});
+	    $sortmeta = $doc_obj->get_metadata_element($doc_obj->get_top_section(), $self->{'sort'});
 	    if (defined $sortmeta) {
-		$sortmeta = &sorttools::format_metadata_for_sorting($self->{'sortname'}, $sortmeta, $doc_obj);
+		$sortmeta = &sorttools::format_metadata_for_sorting($self->{'sort'}, $sortmeta, $doc_obj);
 	    }
 	}
@@ -252,7 +230,7 @@
 	my @doc_list;
 	# generate a sorted list of doc ids
-	if ($nosort && scalar(@{$top_hash->{$key}->{'docs'}})) {
+	if (not (defined ($self->{'sort'})) && scalar(@{$top_hash->{$key}->{'docs'}})) {
 	    @doc_list = @{$top_hash->{$key}->{'docs'}};
-	} elsif (!$nosort && (keys %{$top_hash->{$key}->{'docs'}})) {
+	} elsif (defined ($self->{'sort'}) && (keys %{$top_hash->{$key}->{'docs'}})) {
 	    @doc_list = sort {$top_hash->{$key}->{'docs'}->{$a} 
 			      cmp $top_hash->{$key}->{'docs'}->{$b};} keys %{$top_hash->{$key}->{'docs'}};
@@ -289,8 +267,8 @@
     if ($self->{'path_hash'}) {
 	if ($self->{'hlist_at_top'}) {
-	    $classification = $self->get_entry ($self->{'title'}, "HList", "Invisible");
+	    $classification = $self->get_entry ($self->{'buttonname'}, "HList", "Invisible");
 	}
 	else {
-	    $classification = $self->get_entry ($self->{'title'}, "VList", "Invisible");
+	    $classification = $self->get_entry ($self->{'buttonname'}, "VList", "Invisible");
 	}
     }
@@ -319,8 +297,8 @@
 
     if ($self->{'hlist_at_top'}) {
-	$classifyinfo = $self->get_entry ($self->{'title'}, "HList", "Invisible");
+	$classifyinfo = $self->get_entry ($self->{'buttonname'}, "HList", "Invisible");
     }
     else {
-	$classifyinfo = $self->get_entry ($self->{'title'}, "VList", "Invisible");
+	$classifyinfo = $self->get_entry ($self->{'buttonname'}, "VList", "Invisible");
     }
 
Index: /trunk/gsdl/perllib/classify/List.pm
===================================================================
--- /trunk/gsdl/perllib/classify/List.pm	(revision 10217)
+++ /trunk/gsdl/perllib/classify/List.pm	(revision 10218)
@@ -44,10 +44,10 @@
   	'desc' => "{BasClas.buttonname}",
 	'type' => "string",
-	'deft' => "{BasClas.metadata.deft}",
+#	'deft' => "{BasClas.metadata.deft}",
 	'reqd' => "no" },
       { 'name' => "sort",
 	'desc' => "{List.sort}",
 	'type' => "string",
-	'deft' => "{BasClas.metadata.deft}",
+#	'deft' => "{BasClas.metadata.deft}",
 	'reqd' => "no" } ];
 
@@ -60,74 +60,59 @@
 
 sub new {
-    my $class = shift (@_);
-    my $self = new BasClas($class, @_);
-
-    # 14-05-02 To allow for proper inheritance of arguments - John Thompson
-    my $option_list = $self->{'option_list'};
-    push( @{$option_list}, $options );
-
-    if ($self->{'info_only'}) {
-	# created from classinfo.pl - don't need to parse the arguments
-	return bless $self, $class;
-    }
-
-    my ($metadata, $title, $sortname, $list);
-
-    if (!parsargv::parse(\@_, 
-			 q^metadata/.*/^, \$metadata,
-			 q^buttonname/.*/^, \$title,
-			 q^sort/.*/^, \$sortname,
-			 "allow_extra_options")) {
-	
-	print STDERR "\nIncorrect options passed to $class, check your collect.cfg file\n";
-	$self->print_txt_usage("");  # Use default resource bundle
-	die "\n";
-    }
-    my @meta_list;
-    my $meta1;
-    
-    if ($metadata) {
-	@meta_list = split(/,/, $metadata);
+    my ($class) = shift (@_);
+
+    my ($classifierslist,$inputargs,$hashArgOptLists) = @_;
+    push(@$classifierslist, $class);
+
+    if(defined $arguments){ push(@{$hashArgOptLists->{"ArgList"}},@{$arguments});}
+    if(defined $options) { push(@{$hashArgOptLists->{"OptList"}},$options)};
+
+    my $self = (defined $hashArgOptLists)? new BasClas($classifierslist,$inputargs,$hashArgOptLists): new BasClas($classifierslist,$inputargs);
+
+    # Transfer value from Auto Parsing to the variable name that used in previous GreenStone.
+    my (@meta_list,$meta1);
+    print STDERR "new List\n";
+    if ($self->{"metadata"}) {
+	print STDERR "List: splitting metadata, ".$self->{"metadata"}."\n";
+	@meta_list = split(/,/, $self->{"metadata"});
 	$meta1 = $meta_list[0];
-    } else {
-	$metadata = undef;
+	$self->{'meta_list'} = \@meta_list;
+    } else {
 	$meta1=undef;
 	@meta_list = undef;
     }
 
-    if (!$title) {
-	if (defined ($meta1)) {
-	    $title = $meta1;
-	} else {
-	    $title = 'List';
-	}
-    }
-
-    # sortname is handled a bit differently - kjdon
+    if (!$self->{"buttonname"}) {
+	if (defined ($self->{'metadata'})) {
+	    $self->{"buttonname"} = $self->generate_title_from_metadata($self->{'metadata'});
+	} else {
+	    $self->{"buttonname"} = 'List';
+	}
+    }
+
+    # Further setup
+    # $self->{"sort"} is handled a bit differently - kjdon
     # undef means to sort, but use the metadata value from -metadata
     # because there is no one metadata value to get for sorting when 
     # we have a list of possible metadata
-    # to get no sorting, set sortname = 'nosort'
-    if (!$sortname) {
-	if (defined ($metadata)) {
-	    $sortname = undef;
-	} else {
-	    $sortname = "nosort";
-	}
-    }
+    # to get no sorting, set $self->{"sort"} = 'nosort'
+    if (!$self->{"sort"}) {
+	print STDERR "no sorting\n";
+	if (defined ($self->{"metadata"})) {
+	    $self->{"sort"} = undef;
+	    print STDERR "setting no meta\n";
+	} else {
+	    $self->{"sort"} = "nosort";
+	}
+    }    
+    if (defined  $self->{"sort"} &&  $self->{"sort"} eq "nosort") {
+	$self->{'list'} = [];
+    } else {
+	$self->{'list'} = {};
+    }
+        
+    # Clean out the unused keys
+    delete $self->{"metadata"}; # Delete this key
     
-    if (defined $sortname && $sortname eq "nosort") {
-	$list = [];
-    } else {
-	$list = {};
-    }
-    
-    $self->{'list'} = $list;
-    if (defined $metadata) {
-	$self->{'meta_list'} = \@meta_list;
-    }
-    $self->{'title'} = $title;
-    $self->{'sortname'} = $sortname;
-
     return bless $self, $class;
 }
@@ -146,5 +131,5 @@
     # are we sorting the list??
     my $nosort = 0;
-    if (defined $self->{'sortname'} && $self->{'sortname'} eq "nosort") {
+    if (defined $self->{'sort'} && $self->{'sort'} eq "nosort") {
 	$nosort = 1;
     }
@@ -195,12 +180,12 @@
 
     #check for a sort element other than our metadata
-    if (defined $self->{'sortname'}) {
+    if (defined $self->{'sort'}) {
 	my $sortmeta;
-	if ($self->{'sortname'} =~ /^filename$/i) {
+	if ($self->{'sort'} =~ /^filename$/i) {
 	    $sortmeta = $doc_obj->get_source_filename();
 	} else {
-	    $sortmeta = $doc_obj->get_metadata_element($doc_obj->get_top_section(), $self->{'sortname'});
+	    $sortmeta = $doc_obj->get_metadata_element($doc_obj->get_top_section(), $self->{'sort'});
 	    if (defined $sortmeta) {
-		$sortmeta = &sorttools::format_metadata_for_sorting($self->{'sortname'}, $sortmeta, $doc_obj);
+		$sortmeta = &sorttools::format_metadata_for_sorting($self->{'sort'}, $sortmeta, $doc_obj);
 	    }
 	}
@@ -225,5 +210,5 @@
 
     my @list = ();
-    if (defined $self->{'sortname'} && $self->{'sortname'} eq "nosort") {
+    if (defined $self->{'sort'} && $self->{'sort'} eq "nosort") {
 	@list = @{$self->{'list'}};
     } else {
@@ -233,8 +218,7 @@
 	}	
     }
-
     # organise into classification structure
     my %classifyinfo = ('childtype'=>'VList',
-			'Title'=>$self->{'title'},
+			'Title'=>$self->{'buttonname'},
 			'contains'=>[]);
     $classifyinfo{'thistype'} = 'Invisible' unless $no_thistype;
Index: /trunk/gsdl/perllib/classify/Phind.pm
===================================================================
--- /trunk/gsdl/perllib/classify/Phind.pm	(revision 10217)
+++ /trunk/gsdl/perllib/classify/Phind.pm	(revision 10218)
@@ -150,17 +150,12 @@
 
 sub new {
-    my $class = shift (@_);
-    my $self = new BasClas($class, @_);
-
-    # 14-05-02 To allow for proper inheritance of arguments - John Thompson
-    my $option_list = $self->{'option_list'};
-    push( @{$option_list}, $options );
-
-    if ($self->{'info_only'}) {
-	# created from classinfo.pl - don't need to parse the arguments
-	return bless $self, $class;
-    }
-
-    my $out = $self->{'outhandle'};
+    my ($class) = shift (@_);
+    my ($classifierslist,$inputargs,$hashArgOptLists) = @_;
+    push(@$classifierslist, $class);
+
+    if(defined $arguments){ push(@{$hashArgOptLists->{"ArgList"}},@{$arguments});}
+    if(defined $options) { push(@{$hashArgOptLists->{"OptList"}},$options)};
+
+    my $self = (defined $hashArgOptLists)? new BasClas($classifierslist,$inputargs,$hashArgOptLists): new BasClas($classifierslist,$inputargs);
 
     # Ensure the Phind generate scripts are in place
@@ -168,44 +163,23 @@
     $file1 .= ".exe" if $ENV{'GSDLOS'} =~ /^windows$/;
     my $src = &util::filename_cat($ENV{'GSDLHOME'}, "src", "phind", "generate");
-
     if (!(-e $file1)) {
 	print STDERR "Phind.pm: ERROR: The Phind \"suffix\" program is not installed.\n\n";
 	exit(1);
     }
-
-    # Parse classifier arguments
-    my $builddir = "";
-    if (!parsargv::parse(\@_, 
-			 q^text/.*/section:Title,section:text^, \$self->{'indexes'},
-			 q^title/.*/Title^, \$self->{'titlefield'},
-			 q^buttonname/.*/Phrase^, \$self->{'buttonname'},
-			 q^language/.*/en^, \$language,
-			 q^savephrases/.*/^, \$self->{'savephrases'},
-			 q^suffixmode/\d/1^, \$self->{'suffixmode'},
-			 q^min_occurs/\d/2^, \$self->{'min_occurs'},
-			 q^thesaurus/.*/^, \$self->{'thesaurus'},
-			 q^untidy^, \$self->{'untidy'},
-			 "allow_extra_options")) {
-	
-	print STDERR "\nIncorrect options passed to $class, check your collect.cfg file\n";
-	$self->print_txt_usage("");  # Use default resource bundle
-	die "\n";
-    }
-    
-    # classifier information
-    $self->{'collection'} = $ENV{'GSDLCOLLECTION'};
-
-    # limit languages
-    $self->{'language_exp'} = $language;
-    
-    # collection directories
-    $self->{'collectiondir'} = $ENV{'GSDLCOLLECTDIR'};
-
+    
+    # Transfer value from Auto Parsing to the variable name that used in previous GreenStone.
+    $self->{"indexes"} = $self->{"text"};
+
+    # Further setup
+    $self->{'collection'} = $ENV{'GSDLCOLLECTION'}; # classifier information
+    $self->{'collectiondir'} = $ENV{'GSDLCOLLECTDIR'}; # collection directories
     if (! defined $self->{'builddir'}) {
 	$self->{'builddir'} = &util::filename_cat($ENV{'GSDLCOLLECTDIR'}, "building");
     } 
-
     $self->{'total'} = 0;
-   
+    
+    # Clean out the unused keys
+    delete $self->{"text"};
+
     return bless $self, $class;
 }
@@ -265,5 +239,5 @@
     my $top_section = $doc_obj->get_top_section();
 
-    my $titlefield = $self->{'titlefield'};
+    my $titlefield = $self->{'title'};
     
     my $title = $doc_obj->get_metadata_element ($top_section, $titlefield);
@@ -276,5 +250,5 @@
     # Only consider the file if it is in the correct language
     my $doclanguage = $doc_obj->get_metadata_element ($top_section, "Language");
-    my $phrlanguage = $self->{'language_exp'};
+    my $phrlanguage = $self->{'language'};
     return if ($doclanguage && ($doclanguage !~ /$phrlanguage/i));
     
@@ -282,5 +256,4 @@
     $self->{'total'} ++;
     print "file $self->{'total'}: $file\n" if ($self->{'$verbosity'});
-    
 
     # Store document details
@@ -698,5 +671,5 @@
     my $phinddir = $self->{'phinddir'};
 
-    my $language_exp = $self->{'language_exp'};
+    my $language_exp = $self->{'language'};
 
     my ($w, $l, $line, $word);
Index: /trunk/gsdl/perllib/classify/SectionList.pm
===================================================================
--- /trunk/gsdl/perllib/classify/SectionList.pm	(revision 10217)
+++ /trunk/gsdl/perllib/classify/SectionList.pm	(revision 10218)
@@ -45,16 +45,14 @@
 
 
-sub new {
-    my $class = shift (@_);
-    my $self = new List($class, @_);
+sub new { 
+    my ($class) = shift (@_);
+    my ($classifierslist,$inputargs,$hashArgOptLists) = @_;
+    push(@$classifierslist, $class);
 
-    # 14-05-02 To allow for proper inheritance of arguments - John Thompson
-    my $option_list = $self->{'option_list'};
-    push( @{$option_list}, $options );
+    if(defined $arguments){ push(@{$hashArgOptLists->{"ArgList"}},@{$arguments});}
+    if(defined $options) { push(@{$hashArgOptLists->{"OptList"}},$options)};
 
-    #if ($self->{'info_only'}) {
-	# created from classinfo.pl - don't need to parse the arguments
-    #	return bless $self, $class;
-    #}
+    my $self = (defined $hashArgOptLists)? new List($classifierslist,$inputargs,$hashArgOptLists): new List($classifierslist,$inputargs);
+
     return bless $self, $class;
 }
@@ -67,5 +65,5 @@
     # are we sorting the list??
     my $nosort = 0;
-    if (defined $self->{'sortname'} && $self->{'sortname'} eq "nosort") {
+    if (defined $self->{'sort'} && $self->{'sort'} eq "nosort") {
 	$nosort = 1;
     }
@@ -83,11 +81,11 @@
 
     my $sortmeta = "";
-    if (!$nosort && defined $self->{'sortname'}) {
-	if ($self->{'sortname'} =~ /^filename$/i) {
+    if (!$nosort && defined $self->{'sort'}) {
+	if ($self->{'sort'} =~ /^filename$/i) {
 	    $sortmeta = $doc_obj->get_source_filename();
 	} else {
-	    $sortmeta = $doc_obj->get_metadata_element($doc_obj->get_top_section(), $self->{'sortname'});
+	    $sortmeta = $doc_obj->get_metadata_element($doc_obj->get_top_section(), $self->{'sort'});
 	    if (defined $sortmeta) {
-		$sortmeta = &sorttools::format_metadata_for_sorting($self->{'sortname'}, $sortmeta, $doc_obj);
+		$sortmeta = &sorttools::format_metadata_for_sorting($self->{'sort'}, $sortmeta, $doc_obj);
 	    }
 	}
@@ -140,9 +138,9 @@
     } 
 
-    if (defined $self->{'sortname'}) {
+    if (defined $self->{'sort'}) {
 	# sorting on alternative metadata
 	$self->{'list'}->{"$doc_OID.$section"} = $sortmeta;
     } else {
-	# sortingon the classification metadata
+	# sorting on the classification metadata
 	# do the same formatting on the meta value as for sort meta
 	$metavalue = &sorttools::format_metadata_for_sorting($metaname, $metavalue, $doc_obj);
Index: /trunk/gsdl/perllib/plugin.pm
===================================================================
--- /trunk/gsdl/perllib/plugin.pm	(revision 10217)
+++ /trunk/gsdl/perllib/plugin.pm	(revision 10218)
@@ -84,5 +84,5 @@
 	$options =~ s/\$/\\\$/g;
 
-	eval ("\$plugobj = new \$pluginname($options)");
+	eval ("\$plugobj = new \$pluginname([],[$options])");
 	die "$@" if $@;
 	
Index: /trunk/gsdl/perllib/plugins/ArcPlug.pm
===================================================================
--- /trunk/gsdl/perllib/plugins/ArcPlug.pm	(revision 10217)
+++ /trunk/gsdl/perllib/plugins/ArcPlug.pm	(revision 10218)
@@ -53,10 +53,12 @@
 
 sub new {
-    my ($class) = @_;
-    my $self = new BasPlug ("ArcPlug", @_);
-	 
-    # 14-05-02 To allow for proper inheritance of arguments - John Thompson
-	 my $option_list = $self->{'option_list'};
-	 push( @{$option_list}, $options );
+    my ($class) = shift (@_);
+    my ($pluginlist,$inputargs,$hashArgOptLists) = @_;
+    push(@$pluginlist, $class);
+
+    if(defined $arguments){print "SETSEGE\n"; push(@{$hashArgOptLists->{"ArgList"}},@{$arguments});}
+    if(defined $options) { push(@{$hashArgOptLists->{"OptList"}},$options)};
+
+    my $self = (defined $hashArgOptLists)? new BasPlug($pluginlist,$inputargs,$hashArgOptLists): new BasPlug($pluginlist,$inputargs);
 
     return bless $self, $class;
Index: /trunk/gsdl/perllib/plugins/BNContentePlug.pm
===================================================================
--- /trunk/gsdl/perllib/plugins/BNContentePlug.pm	(revision 10217)
+++ /trunk/gsdl/perllib/plugins/BNContentePlug.pm	(revision 10218)
@@ -39,5 +39,5 @@
 
 sub BEGIN {
-    @ISA = ('BasPlug');
+    @BNContentePlug::ISA = ('BasPlug');
     unshift (@INC, "$ENV{'GSDLHOME'}/perllib/cpan");
 }
@@ -93,20 +93,12 @@
 
 sub new {
-    my $class = shift (@_);
-    #my $plugin_name = shift (@_);
-
-    $self = new BasPlug ($class, @_);
-    $self->{'plugin_type'} = "BNContentePlug";
-
-    my $option_list = $self->{'option_list'};
-    push( @{$option_list}, $options );
- 
-    if (!parsargv::parse(\@_,
-			 "allow_extra_options")) {
-	print STDERR "\nBNContentePlug uses an incorrect option.\n";
-	print STDERR "Check your collect.cfg configuration file.\n\n";
-	$self->print_txt_usage("");  # Use default resource bundle
-	die "\n";
-    }
+    my ($class) = shift (@_);
+    my ($pluginlist,$inputargs,$hashArgOptLists) = @_;
+    push(@$pluginlist, $class);
+
+    if(defined $arguments){ push(@{$hashArgOptLists->{"ArgList"}},@{$arguments});}
+    if(defined $options) { push(@{$hashArgOptLists->{"OptList"}},$options)};
+
+    $self = (defined $hashArgOptLists)? new BasPlug($pluginlist,$inputargs,$hashArgOptLists): new BasPlug($pluginlist,$inputargs);
     
     #create XML::Parser object for parsing metsHTML.xml, NCB_???.xml files
Index: /trunk/gsdl/perllib/plugins/BasPlug.pm
===================================================================
--- /trunk/gsdl/perllib/plugins/BasPlug.pm	(revision 10217)
+++ /trunk/gsdl/perllib/plugins/BasPlug.pm	(revision 10218)
@@ -53,4 +53,7 @@
 use gsprintf 'gsprintf';
 use printusage;
+#$%^
+use parse2;
+
 
 use GISBasPlug;
@@ -59,7 +62,5 @@
 
 my $unicode_list =
-    [ { 'name' => "auto",
-	'desc' => "{BasPlug.input_encoding.auto}" },
-      { 'name' => "ascii",
+    [ { 'name' => "ascii",
 	'desc' => "{BasPlug.input_encoding.ascii}" },
       { 'name' => "utf8",
@@ -68,4 +69,8 @@
 	'desc' => "{BasPlug.input_encoding.unicode}" } ];
 
+my $auto_unicode_list = 
+    [ { 'name' => "auto",
+	'desc' => "{BasPlug.input_encoding.auto}" } ];
+
 my $arguments =
     [ { 'name' => "process_exp",
@@ -90,5 +95,5 @@
 	'desc' => "{BasPlug.input_encoding}",
 	'type' => "enum",
-	'list' => $unicode_list,
+	'list' => $auto_unicode_list,
 	'reqd' => "no" ,
 	'deft' => "auto" } ,
@@ -107,4 +112,5 @@
 	'type' => "language",
 	'deft' => "en",
+	'char_length' => "2",
 	'reqd' => "no" },
       { 'name' => "extract_acronyms",
@@ -141,9 +147,11 @@
 	'type' => "int",
 	'deft' => (localtime)[5]+1900,
+	'char_length' => "4",
+	#'range' => "2,100",
 	'reqd' => "no"},
       { 'name' => "maximum_century",
 	'desc' => "{BasPlug.maximum_century}",
 	'type' => "string",
-	'deft' => "",
+	'deft' => "-1",
 	'reqd' => "no" },
       { 'name' => "no_bibliography",
@@ -154,5 +162,30 @@
 	'desc' => "{BasPlug.no_cover_image}",
 	'type' => "flag",
-	'reqd' => "no" } ];
+	'reqd' => "no" },
+      { 'name' => "extract_keyphrases",
+	'desc' => "{BasPlug.extract_keyphrases}",
+	'type' => "flag",
+	'reqd' => "no",
+	'hiddengli' => "yes" },
+      { 'name' => "extract_keyphrase_options",
+	'desc' => "{BasPlug.extract_keyphrase_options}",
+	'type' => "string",
+	'reqd' => "no",
+	'hiddengli' => "yes" },
+      { 'name' => "separate_cjk",
+	'desc' => "{BasPlug.separate_cjk}",
+	'type' => "flag",
+	'reqd' => "no",
+	'hiddengli' => "yes" },
+      { 'name' => "smart_block",
+	'desc' => "{BasPlug.smart_block}",
+	'type' => "flag",
+	'reqd' => "no",
+	'hiddengli' => "yes" },
+      { 'name' => "new_extract_email",
+	'desc' => "",
+	'type' => "flag",
+	'reqd' => "no",
+	'hiddengli' => "yes" } ];
 
 my $gis_arguments = 
@@ -238,5 +271,4 @@
 {
     my $self = shift(@_);
-
     # Print the usage message for a plugin (recursively)
     my $descoffset = $self->determine_description_offset(0);
@@ -317,23 +349,45 @@
 
 sub new {
+    # Set Encodings to the list!!
+
+    my $e = $encodings::encodings;
+    foreach my $enc (sort {$e->{$a}->{'name'} cmp $e->{$b}->{'name'}} keys (%$e)) 
+    {
+	my $hashEncode =
+	    {'name' => $enc,
+	     'desc' => $e->{$enc}->{'name'}};
+
+	push(@{$unicode_list},$hashEncode);
+    }
+
+    push(@{$auto_unicode_list},@{$unicode_list});
+
+    # Start the BasPlug Constructor
     my $class = shift (@_);
-    my $plugin_name = shift (@_);
-    my $self = {};
-    $self->{'plugin_type'} = "BasPlug";
+    my ($pluginlist,$args,$hashArgOptLists) = @_;
+    push(@$pluginlist, $class);
+    my $plugin_name = (defined $pluginlist->[0]) ? $pluginlist->[0] : $class;
+
+    if(defined $arguments){ push(@{$hashArgOptLists->{"ArgList"}},@{$arguments});}
+    if(defined $options) { push(@{$hashArgOptLists->{"OptList"}},$options)};
 
     if (GISBasPlug::has_mapdata()) {
 	push(@$arguments,@$gis_arguments);
     }
-
-    my $enc = "^(";
-    map {$enc .= "$_|";} keys %$encodings::encodings;
-    my $denc = $enc . "ascii|utf8|unicode)\$";
-    $enc .= "ascii|utf8|unicode|auto)\$";
-    
+    
+    my $self = {};
+    if(!parse2::parse($args,$hashArgOptLists->{"ArgList"},$self))
+    {
+	my $classTempClass = bless $self, $class;
+	&gsprintf(STDERR, "\n{BasPlug.bad_general_option}\n", $plugin_name);
+	$classTempClass->print_txt_usage("");  # Use default resource bundle
+	die "\n";
+    }
+
+    # else parsing was successful.
+
+    $self->{'plugin_type'} = $plugin_name;
     $self->{'outhandle'} = STDERR;
-    my $year = (localtime)[5]+1900;
-
     $self->{'textcat'} = new textcat();
-
     $self->{'num_processed'} = 0;
     $self->{'num_not_processed'} = 0;
@@ -341,43 +395,8 @@
     $self->{'num_archives'} = 0;
     $self->{'cover_image'} = 1; # cover image is on by default
-
-    # 14-05-02 To allow for proper inheritance of arguments - John Thompson
-    $self->{'option_list'} = [ $options ];
-    
-    my $no_cover_image = 0;
-    # general options available to all plugins
-    if (!parsargv::parse(\@_,
-			 q^process_exp/.*/^, \$self->{'process_exp'},
-			 q^block_exp/.*/^, \$self->{'block_exp'},
-			 q^associate_ext/.*/^, \$self->{'associate_ext'},
-			 q^extract_language^, \$self->{'extract_language'},
-			 q^extract_acronyms^, \$self->{'extract_acronyms'}, 
-			 q^extract_keyphrases^, \$self->{'kea'}, #with extra options (UNDOCUMENTED)
-			 q^extract_keyphrase_options/.*/^, \$self->{'kea_options'}, #no extra options (UNDOCUMENTED)
-			 qq^input_encoding/$enc/auto^, \$self->{'input_encoding'},
-			 qq^default_encoding/$denc/utf8^, \$self->{'default_encoding'},
-			 q^extract_email^, \$self->{'extract_email'},
-			 q^extract_placenames^, \$self->{'extract_placenames'}, 
-			 q^gazetteer/.*/^, \$self->{'gazetteer'},
-			 q^place_list^, \$self->{'place_list'}, 
-			 q^markup_acronyms^, \$self->{'markup_acronyms'},
-			 q^default_language/.{2}/en^, \$self->{'default_language'},
-			 q^first/.*/^, \$self->{'first'},
-			 q^extract_historical_years^, \$self->{'date_extract'},
-			 qq^maximum_year/\\d{4}/$year^, \$self->{'max_year'},
-			 q^no_bibliography^, \$self->{'no_biblio'},
-			 qq^maximum_century/-?\\d{1,2}( ?B\\.C\\.E\\.)?/-1^, \$self->{'max_century'},
-			 q^no_cover_image^, \$no_cover_image,
-			 q^separate_cjk^, \$self->{'separate_cjk'},
-			 q^smart_block^, \$self->{'smart_block'},
-			 q^smart_block_BN^, \$self->{'smart_block_BN'},	
-			 "allow_extra_options")) {
-
-	gsprintf(STDERR, "\n{BasPlug.bad_general_option}\n", $plugin_name);
-    	bless $self, $class;
-	$self->print_txt_usage("");  # Use default resource bundle
-	die "\n";
-    }
-
+    $self->{'cover_image'} = 0 if ($self->{'no_cover_image'});
+    $self->{'file_blocks'} = {};
+    $self->{'option_list'} = $hashArgOptLists->{"OptList"};
+    
     my $associate_ext = $self->{'associate_ext'};
     if ((defined $associate_ext) && ($associate_ext ne "")) {
@@ -395,13 +414,11 @@
     $self->{'file_blocks'} = {};
 
-    $self->{'cover_image'} = 0 if ($no_cover_image);
-
     if ($self->{'extract_placenames'}) {
 
 	my $outhandle = $self->{'outhandle'};
-
+	
 	my $places_ref 
 	    = GISBasPlug::loadGISDatabase($outhandle,$self->{'gazetteer'});
-
+	
 	if (!defined $places_ref) {
 	    print $outhandle "Warning: Error loading mapdata gazetteer \"$self->{'gazetteer'}\"\n";
@@ -414,4 +431,5 @@
     }	
     return bless $self, $class;
+    
 }
 
@@ -1121,8 +1139,26 @@
     @email = sort @email;
     
-    my @email2 = ();
+#    if($self->{"new_extract_email"} == 0)
+#    {
+#    my @email2 = ();
+#    foreach my $address (@email) 
+#   {
+#	if (!(join(" ",@email2) =~ m/(^| )$address( |$)/ )) 
+#	    {
+#		push @email2, $address;
+#		$doc_obj->add_utf8_metadata ($thissection, "emailAddress", $address);
+#		# print $outhandle "  extracting $address\n" 
+#		&gsprintf($outhandle, "  {BasPlug.extracting} $address\n")
+#		    if ($self->{'verbosity'} > 3);
+#	    }
+#	}
+#    }
+#    else
+#    {
+    my $hashExistMail = {};
     foreach my $address (@email) {
-	if (!(join(" ",@email2) =~ m/$address/ )) {
-	    push @email2, $address;
+	if (!(defined $hashExistMail->{$address}))
+	{
+	    $hashExistMail->{$address} = 1;
 	    $doc_obj->add_utf8_metadata ($thissection, "emailAddress", $address);
 	    gsprintf($outhandle, "  {BasPlug.extracting} $address\n")
@@ -1157,6 +1193,6 @@
     } 
 
-    # adding kea keyphrases
-    if ($self->{'kea'}) {
+    #adding kea keyphrases
+    if ($self->{'extract_keyphrases'}) {  
 	
 	my $thissection = $doc_obj->get_top_section();
@@ -1171,11 +1207,10 @@
 	} 
        
-	if ($self->{'kea_options'}) {
-	    #if kea options flag is set, call Kea with specified options 
-	    $list = &Kea::extract_KeyPhrases ($text, $self->{'kea_options'}); 
-	} else { 
-	    #otherwise call Kea with no options
+	if($self->{'extract_keyphrase_options'}) { #if kea options flag is set, call Kea with specified options 
+	    $list = &Kea::extract_KeyPhrases ($text, $self->{'extract_keyphrase_options'}); 
+	} else { #otherwise call Kea with no options
 	    $list = &Kea::extract_KeyPhrases ($text); 
 	}
+	 
 	if ($list){
 	    # if a list of kea keyphrases was returned (ie not empty)
@@ -1227,14 +1262,14 @@
     }
 
-    if($self->{'date_extract'}) {
+    if($self->{'extract_historical_years'}) {
 	my $thissection = $doc_obj->get_top_section();
 	while (defined $thissection) {
-	    
+
 	    my $text = $doc_obj->get_text($thissection);
 	    &DateExtract::get_date_metadata($text, $doc_obj, 
 					    $thissection, 
-					    $self->{'no_biblio'}, 
-					    $self->{'max_year'}, 
-					    $self->{'max_century'});
+					    $self->{'no_bibliography'}, 
+					    $self->{'maximum_year'}, 
+					    $self->{'maximum_century'});
 	    $thissection = $doc_obj->get_next_section ($thissection);
 	}
Index: /trunk/gsdl/perllib/plugins/BibTexPlug.pm
===================================================================
--- /trunk/gsdl/perllib/plugins/BibTexPlug.pm	(revision 10217)
+++ /trunk/gsdl/perllib/plugins/BibTexPlug.pm	(revision 10218)
@@ -81,10 +81,13 @@
 }
 sub new {
-    my $class = shift (@_);
-    my $self = new SplitPlug ($class, @_);
-    $self->{'plugin_type'} = "BibTexPlug";
-    # 14-05-02 To allow for proper inheritance of arguments - John Thompson
-    my $option_list = $self->{'option_list'};
-    push( @{$option_list}, $options );
+    my ($class) = shift (@_);
+    my ($pluginlist,$inputargs,$hashArgOptLists) = @_;
+    push(@$pluginlist, $class);
+
+    if(defined $arguments){ push(@{$hashArgOptLists->{"ArgList"}},@{$arguments});}
+    if(defined $options) { push(@{$hashArgOptLists->{"OptList"}},$options)};
+
+    my $self = (defined $hashArgOptLists)? new SplitPlug($pluginlist,$inputargs,$hashArgOptLists): new SplitPlug($pluginlist,$inputargs);
+
     return bless $self, $class;
 }
Index: /trunk/gsdl/perllib/plugins/BookPlug.pm
===================================================================
--- /trunk/gsdl/perllib/plugins/BookPlug.pm	(revision 10217)
+++ /trunk/gsdl/perllib/plugins/BookPlug.pm	(revision 10218)
@@ -79,11 +79,13 @@
 
 sub new {
-    my ($class) = @_;
-    my $self = new BasPlug ("BookPlug", @_);
-    $self->{'plugin_type'} = "BookPlug";
-    # 14-05-02 To allow for proper inheritance of arguments - John Thompson
-    my $option_list = $self->{'option_list'};
-    push( @{$option_list}, $options );
-    
+    my ($class) = shift (@_);
+    my ($pluginlist,$inputargs,$hashArgOptLists) = @_;
+    push(@$pluginlist, $class);
+
+    if(defined $arguments){ push(@{$hashArgOptLists->{"ArgList"}},@{$arguments});}
+    if(defined $options) { push(@{$hashArgOptLists->{"OptList"}},$options)};
+
+    my $self = (defined $hashArgOptLists)? new BasPlug($pluginlist,$inputargs,$hashArgOptLists): new BasPlug($pluginlist,$inputargs);
+
     return bless $self, $class;
 }
Index: /trunk/gsdl/perllib/plugins/ConvertToPlug.pm
===================================================================
--- /trunk/gsdl/perllib/plugins/ConvertToPlug.pm	(revision 10217)
+++ /trunk/gsdl/perllib/plugins/ConvertToPlug.pm	(revision 10218)
@@ -65,5 +65,15 @@
 	'desc' => "{ConvertToPlug.use_strings}",
 	'type' => "flag",
-	'reqd' => "no" } ];
+	'reqd' => "no" },
+      { 'name' => "extract_keyphrases",
+	'desc' => "{BasPlug.extract_keyphrases}",
+	'type' => "flag",
+	'reqd' => "no",
+	'hiddengli' => "yes" },
+      { 'name' => "extract_keyphrase_options",
+	'desc' => "{BasPlug.extract_keyphrase_options}",
+	'type' => "string",
+	'reqd' => "no",
+	'hiddengli' => "yes" } ];
 
 my $options = { 'name'     => "ConvertToPlug",
@@ -73,48 +83,43 @@
 		'args'     => $arguments };
 
-sub parse_args
+
+sub findType
 {
-    my $class = shift (@_);
-    my ($args) = @_;
-
-    my $plugin_name = $class;
-    $plugin_name =~ s/\.pm$//;
-
-    my $newargs = {};
-
-    if (!parsargv::parse($args,  
-			 q^extract_keyphrases^, \$newargs->{'kea'}, #with extra options (undocumented) 
-			 q^extract_keyphrase_options/.*/^, \$newargs->{'kea_options'}, #no extra options (undocumented)
-			 q^convert_to/(html|text)/html^, \$newargs->{'generate_format'},
-			 q^use_strings^, \$newargs->{'use_strings'},
-			 "allow_extra_options")) {
-
-	print STDERR "\nIncorrect options passed to $plugin_name, ";
-	print STDERR "check your collect.cfg configuration file\n";
-	$self->print_txt_usage("");  # Use default resource bundle
-	die "\n";
-    }
-   
-    return ($plugin_name, $newargs);
+    my ($inputargs) = @_;
+    
+    for(my $intCounter = 0; $intCounter < scalar(@{$inputargs}) ; $intCounter++)
+    {
+	if($inputargs->[$intCounter] eq "-convert_to")
+	{
+	    if($inputargs->[$intCounter+1] eq "text" || $inputargs->[$intCounter+1] eq "html")
+	    {
+		return $inputargs->[$intCounter+1];
+	    }
+	    else {return "html";}
+	}
+    }
+    return "html";
 }
 
 sub new {
-    my $class = shift (@_);
-    if ($class eq "ConvertToPlug" && defined $_[0]) {$class = shift (@_);}
-    my $self;
-    # parsargv::parse might modify the list, so we do this by creating a copy
-    # of the argument list.
-    my @arglist = @_;
-    my ($plugin_name, $args) = $class->parse_args(\@_);
-
-    if ($class eq "PDFPlug" && $args->{'generate_format'} eq "text" && 
+    my ($class) = shift (@_);
+    my ($pluginlist,$inputargs,$hashArgOptLists) = @_;
+    push(@$pluginlist, $class);
+    my $classPluginName = (defined $pluginlist->[0]) ? $pluginlist->[0] : $class;
+    my $strConvertTo = findType($inputargs);
+
+    if(defined $arguments){ push(@{$hashArgOptLists->{"ArgList"}},@{$arguments});}
+    if(defined $options) { push(@{$hashArgOptLists->{"OptList"}},$options)};
+
+    if ($classPluginName eq "PDFPlug" && $strConvertTo eq "text" && 
 	$ENV{'GSDLOS'} =~ /^windows$/i) {
 	print STDERR "Windows does not support pdf to text. PDFs will be converted to HTML instead\n";
-	$args->{'generate_format'} = "html";
-    }
-
-    if ($args->{'generate_format'} eq "text")
+	$strConvertTo = "html";
+    }
+
+    my $self = {};
+    if ($strConvertTo eq "text")
     {
-	$self = new TEXTPlug ($class, @arglist);
+	$self = (defined $hashArgOptLists)? new TEXTPlug($pluginlist,$inputargs,$hashArgOptLists): new TEXTPlug($pluginlist,$inputargs);
 	$self->{'convert_to'} = "TEXT";
 	$self->{'convert_to_ext'} = "txt";
@@ -122,5 +127,5 @@
     else
     {
-	$self = new HTMLPlug ($class, @arglist);
+	$self = (defined $hashArgOptLists)? new HTMLPlug($pluginlist,$inputargs,$hashArgOptLists): new HTMLPlug($pluginlist,$inputargs);
 	$self->{'convert_to'} = "HTML";
 	$self->{'convert_to_ext'} = "html";
@@ -130,12 +135,4 @@
     }
 
-    # 14-05-02 To allow for proper inheritance of arguments - John Thompson
-    my $option_list = $self->{'option_list'};
-    push( @{$option_list}, $options );
-
-    foreach my $key (keys %$args) {
-      $self->{$key} = $args->{$key};
-    }
- 
     return bless $self, $class;
 }
@@ -273,5 +270,5 @@
 
     my $outhandle = $self->{'outhandle'};
-
+    
     my $filename = $file;
     $filename = &util::filename_cat ($base_dir, $file) if $base_dir =~ /\w/;
@@ -296,4 +293,5 @@
 
     my $output_ext = $self->{'convert_to_ext'};
+    
     my $conv_filename = $self->tmp_area_convert_file($output_ext, $filename);
 
Index: /trunk/gsdl/perllib/plugins/ConvertToRogPlug.pm
===================================================================
--- /trunk/gsdl/perllib/plugins/ConvertToRogPlug.pm	(revision 10217)
+++ /trunk/gsdl/perllib/plugins/ConvertToRogPlug.pm	(revision 10218)
@@ -63,19 +63,15 @@
 
 sub new {
-    my $class = shift (@_);
-    if ($class eq "ConvertToRogPlug" && defined $_[0]) {$class = shift (@_);}
-    my $self;
-    # parsargv::parse might modify the list, so we do this by creating a copy
-    # of the argument list.
-    my @arglist = @_;
-    my ($plugin_name) = $class->parse_args(\@_);
-
-    $self = new RogPlug ($class, @arglist);
+    my ($class) = shift (@_);
+    my ($pluginlist,$inputargs,$hashArgOptLists) = @_;
+    push(@$pluginlist, $class);
+
+    if(defined $arguments){ push(@{$hashArgOptLists->{"ArgList"}},@{$arguments});}
+    if(defined $options) { push(@{$hashArgOptLists->{"OptList"}},$options)};
+
+    my $self = (defined $hashArgOptLists)? new RogPlug($pluginlist,$inputargs,$hashArgOptLists): new RogPlug($pluginlist,$inputargs);
+
     $self->{'convert_to'} = "Rog";
     $self->{'convert_to_ext'} = "rog";
-    $self->{'plugin_type'} = "ConvertToRogPlug";
-    # 14-05-02 To allow for proper inheritance of arguments - John Thompson
-    my $option_list = $self->{'option_list'};
-    push( @{$option_list}, $options );
 
     return bless $self, $class;
Index: /trunk/gsdl/perllib/plugins/DBPlug.pm
===================================================================
--- /trunk/gsdl/perllib/plugins/DBPlug.pm	(revision 10217)
+++ /trunk/gsdl/perllib/plugins/DBPlug.pm	(revision 10218)
@@ -61,16 +61,12 @@
 
 sub new {
-    my ($class) = @_;
-    my $self = new BasPlug ($class, @_);
-    $self->{'plugin_type'} = "DBPlug";
-    my $option_list = $self->{'option_list'};
-    push( @{$option_list}, $options );
-
-    # no plugin-specific options
-#    if (!parsargv::parse(\@_, "allow_extra_options")) {
-#	$self->print_txt_usage("");  # Use default resource bundle
-#	die "\n";
-#    }
-
+    my ($class) = shift (@_);
+    my ($pluginlist,$inputargs,$hashArgOptLists) = @_;
+    push(@$pluginlist, $class);
+
+    if(defined $arguments){ push(@{$hashArgOptLists->{"ArgList"}},@{$arguments});}
+    if(defined $options) { push(@{$hashArgOptLists->{"OptList"}},$options)};
+
+    my $self = (defined $hashArgOptLists)? new BasPlug($pluginlist,$inputargs,$hashArgOptLists): new BasPlug($pluginlist,$inputargs);
 
     return bless $self, $class;
Index: /trunk/gsdl/perllib/plugins/DSpacePlug.pm
===================================================================
--- /trunk/gsdl/perllib/plugins/DSpacePlug.pm	(revision 10217)
+++ /trunk/gsdl/perllib/plugins/DSpacePlug.pm	(revision 10218)
@@ -54,5 +54,5 @@
 
 sub BEGIN {
-    @ISA = ('BasPlug');
+    @DSpacePlug::ISA = ('BasPlug');
 }
 
@@ -96,24 +96,12 @@
 
 sub new {
-    my $class = shift (@_);
-    #my $plugin_name = shift (@_);
-
-    $self = new BasPlug ($class, @_);
-    $self->{'plugin_type'} = "DSpacePlug";
-
-    my $option_list = $self->{'option_list'};
-    push( @{$option_list}, $options );
-
- 
-    if (!parsargv::parse(\@_,
-			 q^only_first_doc^, \$self->{'only_first_doc'},
-			 q^first_inorder_ext/.*/^, \$self->{'first_inorder_ext'},
-			 q^first_inorder_mime/.*/^, \$self->{'first_inorder_mime'},
-			 "allow_extra_options")) {
-	print STDERR "\nDSpacePlug uses an incorrect option.\n";
-	print STDERR "Check your collect.cfg configuration file.\n\n";
-	$self->print_txt_usage("");  # Use default resource bundle
-	die "\n";
-    }
+    my ($class) = shift (@_); 
+    my ($pluginlist,$inputargs,$hashArgOptLists) = @_;
+    push(@$pluginlist, $class);
+
+    if(defined $arguments){ push(@{$hashArgOptLists->{"ArgList"}},@{$arguments});}
+    if(defined $options) { push(@{$hashArgOptLists->{"OptList"}},$options)};
+
+    $self = (defined $hashArgOptLists)? new BasPlug($pluginlist,$inputargs,$hashArgOptLists): new BasPlug($pluginlist,$inputargs);
     
     #create XML::Parser object for parsing dublin_core.xml files
Index: /trunk/gsdl/perllib/plugins/EMAILPlug.pm
===================================================================
--- /trunk/gsdl/perllib/plugins/EMAILPlug.pm	(revision 10217)
+++ /trunk/gsdl/perllib/plugins/EMAILPlug.pm	(revision 10218)
@@ -113,21 +113,13 @@
 
 sub new {
-    my ($class) = @_;
-    my $self = new BasPlug ($class, @_);
-    $self->{'plugin_type'} = "EMAILPlug";
-    # 14-05-02 To allow for proper inheritance of arguments - John Thompson
-    my $option_list = $self->{'option_list'};
-    push( @{$option_list}, $options );
-
-    if (!parsargv::parse(\@_, 
-			 q^split_exp/.*/^, \$self->{'split_exp'},
-			 q^no_attachments^, \$self->{'ignore_attachments'},
-			 q^headers^, \$self->{'header_metadata'},
-			 "allow_extra_options")) {
-	print STDERR "\nIncorrect options passed to $class.";
-	print STDERR "\nCheck your collect.cfg configuration file\n";
-	$self->print_txt_usage("");  # Use default resource bundle
-	die "\n";
-    }
+    my ($class) = shift (@_);
+    my ($pluginlist,$inputargs,$hashArgOptLists) = @_;
+    push(@$pluginlist, $class);
+
+    if(defined $arguments){ push(@{$hashArgOptLists->{"ArgList"}},@{$arguments});}
+    if(defined $options) { push(@{$hashArgOptLists->{"OptList"}},$options)};
+
+    my $self = (defined $hashArgOptLists)? new SplitPlug($pluginlist,$inputargs,$hashArgOptLists): new SplitPlug($pluginlist,$inputargs);
+
     $self->{'assoc_filenames'} = {}; # to save attach names so we don't clobber
 
@@ -431,5 +423,5 @@
 
     
-    if ($self->{'header_metadata'} && $self->{'header_metadata'} == 1) {
+    if ($self->{'headers'} && $self->{'headers'} == 1) {
 	# Add "All headers" metadata
 	$Headers = &text_into_html($Headers);
@@ -791,5 +783,5 @@
 	
 	# save attachment by default
-	if (!$self->{'ignore_attachments'}
+	if (!$self->{'no_attachments'}
 	    && $filename ne "") { # this part has a file...
 	    my $encoding="8bit";
Index: /trunk/gsdl/perllib/plugins/ExcelPlug.pm
===================================================================
--- /trunk/gsdl/perllib/plugins/ExcelPlug.pm	(revision 10217)
+++ /trunk/gsdl/perllib/plugins/ExcelPlug.pm	(revision 10218)
@@ -49,18 +49,12 @@
 
 sub new {
-    my $class = shift (@_);
+    my ($class) = shift (@_);
+    my ($pluginlist,$inputargs,$hashArgOptLists) = @_;
+    push(@$pluginlist, $class);
 
-    my $self = new ConvertToPlug ($class, @_);
-    $self->{'plugin_type'} = "ExcelPlug";
-# I'm not sure what encoding xlhtml produces - I think it puts it
-# into the Content-Type meta tag in the header of the HTML file.
+    if(defined $arguments){ push(@{$hashArgOptLists->{"ArgList"}},@{$arguments});}
+    if(defined $options) { push(@{$hashArgOptLists->{"OptList"}},$options)};
 
-#    if ($self->{'input_encoding'} eq "auto") {
-#	$self->{'input_encoding'} = "utf8";
-#    }
-
-    # 14-05-02 To allow for proper inheritance of arguments - John Thompson
-    my $option_list = $self->{'option_list'};
-    push( @{$option_list}, $options );
+    my $self = (defined $hashArgOptLists)? new ConvertToPlug($pluginlist,$inputargs,$hashArgOptLists): new ConvertToPlug($pluginlist,$inputargs);
 
     return bless $self, $class;
Index: /trunk/gsdl/perllib/plugins/FOXPlug.pm
===================================================================
--- /trunk/gsdl/perllib/plugins/FOXPlug.pm	(revision 10217)
+++ /trunk/gsdl/perllib/plugins/FOXPlug.pm	(revision 10218)
@@ -51,10 +51,12 @@
 
 sub new {
-    my ($class) = @_;
-    $self = new BasPlug ();
-    $self->{'plugin_type'} = "FOXPlug";
-    # 14-05-02 To allow for proper inheritance of arguments - John Thompson
-    my $option_list = $self->{'option_list'};
-    push( @{$option_list}, $options );
+    my ($class) = shift (@_);
+    my ($pluginlist,$inputargs,$hashArgOptLists) = @_;
+    push(@$pluginlist, $class);
+
+    if(defined $arguments){ push(@{$hashArgOptLists->{"ArgList"}},@{$arguments});}
+    if(defined $options) { push(@{$hashArgOptLists->{"OptList"}},$options)};
+
+    my $self = (defined $hashArgOptLists)? new BasPlug($pluginlist,$inputargs,$hashArgOptLists): new BasPlug($pluginlist,$inputargs);
 
     return bless $self, $class;
Index: /trunk/gsdl/perllib/plugins/FavouritesPlug.pm
===================================================================
--- /trunk/gsdl/perllib/plugins/FavouritesPlug.pm	(revision 10217)
+++ /trunk/gsdl/perllib/plugins/FavouritesPlug.pm	(revision 10218)
@@ -34,5 +34,5 @@
 
 sub BEGIN {
-    @ISA = ('BasPlug');
+    @FavouritesPlug::ISA = ('BasPlug');
 }
 
@@ -52,11 +52,12 @@
 
 sub new {
-    my ($class) = @_;
-    my $self = new BasPlug ($class, @_);
-    $self->{'plugin_type'} = "FavouritesPlug";
+    my ($class) = shift(@_);
+    my ($pluginlist,$inputargs,$hashArgOptLists) = @_;
+    push(@$pluginlist, $class);
 
-    # To allow for proper inheritance of arguments
-    my $option_list = $self->{'option_list'};
-    push( @{$option_list}, $options );
+    if(defined $arguments){ push(@{$hashArgOptLists->{"ArgList"}},@{$arguments});}
+    if(defined $options) { push(@{$hashArgOptLists->{"OptList"}},$options)};
+
+    my $self = (defined $hashArgOptLists)? new BasPlug($pluginlist,$inputargs,$hashArgOptLists): new BasPlug($pluginlist,$inputargs);
 
     return bless $self, $class;
Index: /trunk/gsdl/perllib/plugins/GAPlug.pm
===================================================================
--- /trunk/gsdl/perllib/plugins/GAPlug.pm	(revision 10217)
+++ /trunk/gsdl/perllib/plugins/GAPlug.pm	(revision 10218)
@@ -32,4 +32,6 @@
 
 use XMLPlug;
+#$%^
+use parse2;
 
 sub BEGIN {
@@ -50,10 +52,12 @@
 
 sub new {
-    my $class = shift (@_);
-    my $self = new XMLPlug ($class, @_);
+    my ($class) = shift (@_);
+    my ($pluginlist,$inputargs,$hashArgOptLists) = @_;
+    push(@$pluginlist, $class);
 
-    # 14-05-02 To allow for proper inheritance of arguments - John Thompson
-    my $option_list = $self->{'option_list'};
-    push( @{$option_list}, $options );
+    if(defined $arguments){ push(@{$hashArgOptLists->{"ArgList"}},@{$arguments});}
+    if(defined $options) { push(@{$hashArgOptLists->{"OptList"}},$options)};
+
+    my $self = (defined $hashArgOptLists)? new XMLPlug($pluginlist,$inputargs,$hashArgOptLists): new XMLPlug($pluginlist,$inputargs);
 
     $self->{'section'} = "";
Index: /trunk/gsdl/perllib/plugins/GMLPlug.pm
===================================================================
--- /trunk/gsdl/perllib/plugins/GMLPlug.pm	(revision 10217)
+++ /trunk/gsdl/perllib/plugins/GMLPlug.pm	(revision 10218)
@@ -53,12 +53,15 @@
 
 sub new {
-    my ($class) = @_;
-    my $self = new BasPlug ("GMLPlug", @_);
-
-    # 14-05-02 To allow for proper inheritance of arguments - John Thompson
-    my $option_list = $self->{'option_list'};
-    push( @{$option_list}, $options );
-
-    return bless $self, $class;}
+    my ($class) = shift (@_);
+    my ($pluginlist,$inputargs,$hashArgOptLists) = @_;
+    push(@$pluginlist, $class);
+
+    if(defined $arguments){ push(@{$hashArgOptLists->{"ArgList"}},@{$arguments});}
+    if(defined $options) { push(@{$hashArgOptLists->{"OptList"}},$options)};
+
+    my $self = (defined $hashArgOptLists)? new BasPlug($pluginlist,$inputargs,$hashArgOptLists): new BasPlug($pluginlist,$inputargs);
+
+    return bless $self, $class;
+}
 
 sub get_default_process_exp {
Index: /trunk/gsdl/perllib/plugins/HBPlug.pm
===================================================================
--- /trunk/gsdl/perllib/plugins/HBPlug.pm	(revision 10217)
+++ /trunk/gsdl/perllib/plugins/HBPlug.pm	(revision 10218)
@@ -68,10 +68,12 @@
 
 sub new {
-    my ($class) = @_;
-    my $self = new BasPlug ("HBPlug", @_);
-    $self->{'plugin_type'} = "HBPlug";
-    # 14-05-02 To allow for proper inheritance of arguments - John Thompson
-    my $option_list = $self->{'option_list'};
-    push( @{$option_list}, $options );
+    my ($class) = shift (@_);
+    my ($pluginlist,$inputargs,$hashArgOptLists) = @_;
+    push(@$pluginlist, $class);
+
+    if(defined $arguments){ push(@{$hashArgOptLists->{"ArgList"}},@{$arguments});}
+    if(defined $options) { push(@{$hashArgOptLists->{"OptList"}},$options)};
+
+    my $self = (defined $hashArgOptLists)? new BasPlug($pluginlist,$inputargs,$hashArgOptLists): new BasPlug($pluginlist,$inputargs);
 
     return bless $self, $class;
Index: /trunk/gsdl/perllib/plugins/HTMLPlug.pm
===================================================================
--- /trunk/gsdl/perllib/plugins/HTMLPlug.pm	(revision 10217)
+++ /trunk/gsdl/perllib/plugins/HTMLPlug.pm	(revision 10218)
@@ -92,4 +92,10 @@
 	'desc' => "{HTMLPlug.description_tags}",
 	'type' => "flag" },
+      # retain this for backward compatibility (w3mir option was replaced by
+      # file_is_url)
+      { 'name' => "w3mir",
+#	'desc' => "{HTMLPlug.w3mir}",
+	'type' => "flag",
+	'hiddengli' => "yes"},
       { 'name' => "no_strip_metadata_html",
 	'desc' => "{HTMLPlug.no_strip_metadata_html}",
@@ -109,34 +115,13 @@
 
 sub new {
-    my $class = shift (@_);
-    my $self = new BasPlug ($class, @_);
-    $self->{'plugin_type'} = "HTMLPlug";
-    # 14-05-02 To allow for proper inheritance of arguments - John Thompson
-    my $option_list = $self->{'option_list'};
-    push( @{$option_list}, $options );
-    
-    if (!parsargv::parse(\@_, 
-			 q^nolinks^, \$self->{'nolinks'},
-			 q^keep_head^, \$self->{'keep_head'},
-			 q^no_metadata^, \$self->{'no_metadata'},
-			 q^metadata_fields/.*/Title^, \$self->{'metadata_fields'},
-			 q^hunt_creator_metadata^, \$self->{'hunt_creator_metadata'},
-			 q^w3mir^, \$self->{'w3mir'},
-			 q^file_is_url^, \$self->{'file_is_url'},
-			 q^assoc_files/.*/(?i)\.(jpe?g|jpe|gif|png|css)$^, \$self->{'assoc_files'},
-			 q^rename_assoc_files^, \$self->{'rename_assoc_files'},
-			 q^title_sub/.*/^, \$self->{'title_sub'},
-			 q^description_tags^, \$self->{'description_tags'},
-			 q^no_strip_metadata_html/.*/^, \$self->{'no_strip_metadata_html'},
-			 q^sectionalise_using_h_tags^, \$self->{'sectionalise_using_h_tags'},
-			 "allow_extra_options")) {
-
-	print STDERR "\nIncorrect options passed to HTMLPlug, check your collect.cfg configuration file\n";
-	$self->print_txt_usage("");  # Use default resource bundle
-	die "\n";
-    }
-
-    # retain this for backward compatibility (w3mir option was replaced by
-    # file_is_url)
+    my ($class) = shift (@_);
+    my ($pluginlist,$inputargs,$hashArgOptLists) = @_;
+    push(@$pluginlist, $class);
+
+    if(defined $arguments){ push(@{$hashArgOptLists->{"ArgList"}},@{$arguments});}
+    if(defined $options) { push(@{$hashArgOptLists->{"OptList"}},$options)};
+
+    my $self = (defined $hashArgOptLists)? new BasPlug($pluginlist,$inputargs,$hashArgOptLists): new BasPlug($pluginlist,$inputargs);
+
     if ($self->{'w3mir'}) {
 	$self->{'file_is_url'} = 1;
@@ -146,5 +131,5 @@
     $self->{'dir_num'} = 0;
     $self->{'file_num'} = 0;
-
+    
     return bless $self, $class;
 }
Index: /trunk/gsdl/perllib/plugins/ISISPlug.pm
===================================================================
--- /trunk/gsdl/perllib/plugins/ISISPlug.pm	(revision 10217)
+++ /trunk/gsdl/perllib/plugins/ISISPlug.pm	(revision 10218)
@@ -96,19 +96,12 @@
 sub new
 {
-    my $class = shift(@_);
-
-    my $self = new SplitPlug($class, @_);
-    if (!parsargv::parse(\@_, 
-			 q^subfield_separator/.*/, ^, \$self->{'subfield_separator'},
-			 q^entry_separator/.*/<br>^, \$self->{'entry_separator'},
-			 "allow_extra_options")) {
-	print STDERR "\nIncorrect options passed to ISISPlug, check your collect.cfg configuration file\n";
-	die "\n";
-    }
-
-    # To allow for proper inheritance of arguments
-    my $option_list = $self->{'option_list'};
-    push(@{$option_list}, $options);
-    $self->{'plugin_type'} = "ISISPlug";
+    my ($class) = shift (@_);
+    my ($pluginlist,$inputargs,$hashArgOptLists) = @_;
+    push(@$pluginlist, $class);
+
+    if(defined $arguments){ push(@{$hashArgOptLists->{"ArgList"}},@{$arguments});}
+    if(defined $options) { push(@{$hashArgOptLists->{"OptList"}},$options)};
+
+    my $self = (defined $hashArgOptLists)? new SplitPlug($pluginlist,$inputargs,$hashArgOptLists): new SplitPlug($pluginlist,$inputargs);
 
     return bless $self, $class;
Index: /trunk/gsdl/perllib/plugins/ImagePlug.pm
===================================================================
--- /trunk/gsdl/perllib/plugins/ImagePlug.pm	(revision 10217)
+++ /trunk/gsdl/perllib/plugins/ImagePlug.pm	(revision 10218)
@@ -46,4 +46,5 @@
 	'type' => "int",
 	'deft' => "100",
+	'range' => "1,",
 	'reqd' => "no" },
       { 'name' => "thumbnailtype",
@@ -56,4 +57,5 @@
 	'type' => "int",
 	'deft' => "0",
+	'range' => "1,",
 	'reqd' => "no" },
       { 'name' => "screenviewtype",
@@ -71,4 +73,5 @@
 	'type' => "int",
 	'deft' => "100",
+	'range' => "1,",
 	'reqd' => "no" } ];
 
@@ -82,28 +85,12 @@
 
 sub new {
-    my ($class) = @_;
-    my $plugin_name = shift (@_);
-    my $self = new BasPlug ("ImagePlug", @_);
-    $self->{'plugin_type'} = "ImagePlug";
-    # 14-05-02 To allow for proper inheritance of arguments - John Thompson
-    my $option_list = $self->{'option_list'};
-    push( @{$option_list}, $options );
-
-    if (!parsargv::parse(\@_,
-			 q^noscaleup^, \$self->{'noscaleup'},
-			 q^converttotype/.*/^, \$self->{'converttotype'},
-			 q^minimumsize/[0-9]*/100^, \$self->{'minimumsize'},
-
-			 q^thumbnailsize/[0-9]*/100^, \$self->{'thumbnailsize'},
-			 q^thumbnailtype/.*/gif^, \$self->{'thumbnailtype'},
-			 q^screenviewsize/[0-9]*/0^, \$self->{'screenviewsize'},
-			 q^screenviewtype/.*/jpg^, \$self->{'screenviewtype'},
-			 "allow_extra_options")) {
-	
-	print STDERR "\nImagePlug uses an incorrect option.\n";
-	print STDERR "Check your collect.cfg configuration file.\n";
-	$self->print_txt_usage("");  # Use default resource bundle
-	die "\n";
-    }
+    my ($class) = shift (@_);
+    my ($pluginlist,$inputargs,$hashArgOptLists) = @_;
+    push(@$pluginlist, $class);
+
+    if(defined $arguments){ push(@{$hashArgOptLists->{"ArgList"}},@{$arguments});}
+    if(defined $options) { push(@{$hashArgOptLists->{"OptList"}},$options)};
+
+    my $self = (defined $hashArgOptLists)? new BasPlug($pluginlist,$inputargs,$hashArgOptLists): new BasPlug($pluginlist,$inputargs);
 
     # Check that ImageMagick is installed and available on the path (except for Windows 95/98)
Index: /trunk/gsdl/perllib/plugins/IndexPlug.pm
===================================================================
--- /trunk/gsdl/perllib/plugins/IndexPlug.pm	(revision 10217)
+++ /trunk/gsdl/perllib/plugins/IndexPlug.pm	(revision 10218)
@@ -70,9 +70,12 @@
 
 sub new {
-    my ($class) = @_;
-    my $self = new BasPlug ("IndexPlug", @_);
-    # 14-05-02 To allow for proper inheritance of arguments - John Thompson
-    my $option_list = $self->{'option_list'};
-    push( @{$option_list}, $options );
+    my ($class) = shift (@_);
+    my ($pluginlist,$inputargs,$hashArgOptLists) = @_;
+    push(@$pluginlist, $class);
+
+    if(defined $arguments){ push(@{$hashArgOptLists->{"ArgList"}},@{$arguments});}
+    if(defined $options) { push(@{$hashArgOptLists->{"OptList"}},$options)};
+
+    my $self = (defined $hashArgOptLists)? new BasPlug($pluginlist,$inputargs,$hashArgOptLists): new BasPlug($pluginlist,$inputargs);
 
     return bless $self, $class;
Index: /trunk/gsdl/perllib/plugins/LaTeXPlug.pm
===================================================================
--- /trunk/gsdl/perllib/plugins/LaTeXPlug.pm	(revision 10217)
+++ /trunk/gsdl/perllib/plugins/LaTeXPlug.pm	(revision 10218)
@@ -28,6 +28,7 @@
 package LaTeXPlug;
 
-use strict;
-no strict 'refs'; # so we can print to a handle named by a variable
+# System complains about $arguments if the strict is set
+#use strict;
+#no strict 'refs'; # so we can print to a handle named by a variable
 
 # greenstone packages
@@ -37,4 +38,8 @@
 use util;
 
+my $options={ 'name' => 'LaTeXPlug',
+	      'desc' => '{LaTeXPlug.desc}',
+	      'abstract' => 'no',
+	      'inherits' => 'yes' };
 sub BEGIN {
     @LaTeXPlug::ISA = ('BasPlug');
@@ -46,25 +51,12 @@
 
 sub new {
-    my $class = shift (@_);
-    my $self = new BasPlug ($class, @_);
-    $self->{'plugin_type'} = 'LaTeXPlug';
-    my $option_list = $self->{'option_list'};
-    my $options={ 'name' => 'LaTeXPlug',
-		  'desc' => '{LaTeXPlug.desc}',
-		  'abstract' => 'no',
-		  'inherits' => 'yes',
-		  'args' => [
-			     ] # no arguments for now...
-			     };
-
-    push( @{$option_list}, $options );
-
-    if (!parsargv::parse(\@_, 
-			 "allow_extra_options")) {
-
-	print STDERR "\nIncorrect options passed to LaTeXPlug, check your collect.cfg configuration file\n";
-	$self->print_txt_usage(""); # don't specify which language bundle
-	die "\n";
-    }
+    my ($class) = shift (@_);
+    my ($pluginlist,$inputargs,$hashArgOptLists) = @_;
+    push(@$pluginlist, $class);
+
+    if(defined $arguments){ push(@{$hashArgOptLists->{"ArgList"}},@{$arguments});}
+    if(defined $options) { push(@{$hashArgOptLists->{"OptList"}},$options)};
+
+    my $self = (defined $hashArgOptLists)? new BasPlug($pluginlist,$inputargs,$hashArgOptLists): new BasPlug($pluginlist,$inputargs);
 
     $self->{'aux_files'} = {};
Index: /trunk/gsdl/perllib/plugins/MACROPlug.pm
===================================================================
--- /trunk/gsdl/perllib/plugins/MACROPlug.pm	(revision 10217)
+++ /trunk/gsdl/perllib/plugins/MACROPlug.pm	(revision 10218)
@@ -85,10 +85,12 @@
 
 sub new {
-    my ($class) = @_;
-    my $self = new BasPlug ($class, @_);
-
-    # 14-05-02 To allow for proper inheritance of arguments - John Thompson
-    my $option_list = $self->{'option_list'};
-    push( @{$option_list}, $options );
+    my ($class) = shift (@_);
+    my ($pluginlist,$inputargs,$hashArgOptLists) = @_;
+    push(@$pluginlist, $class);
+
+    if(defined $arguments){ push(@{$hashArgOptLists->{"ArgList"}},@{$arguments});}
+    if(defined $options) { push(@{$hashArgOptLists->{"OptList"}},$options)};
+
+    my $self = (defined $hashArgOptLists)? new BasPlug($pluginlist,$inputargs,$hashArgOptLists): new BasPlug($pluginlist,$inputargs);
 
     # $self->{'lang_abbr'} = load_language_table();
Index: /trunk/gsdl/perllib/plugins/MARCPlug.pm
===================================================================
--- /trunk/gsdl/perllib/plugins/MARCPlug.pm	(revision 10217)
+++ /trunk/gsdl/perllib/plugins/MARCPlug.pm	(revision 10218)
@@ -69,24 +69,12 @@
 
 sub new {
-    my $class = shift (@_);
-    my $self = new SplitPlug ($class, @_);
-    $self->{'plugin_type'} = "MARCPlug";
-    my $metadata_mapping;
-
-    if (!parsargv::parse(\@_, 
-			 q^metadata_mapping/.*/marctodc.txt^, \$metadata_mapping,
-			 "allow_extra_options")) {
-
-	print STDERR "\nIncorrect options passed to MARCPlug, check your collect.cfg configuration file\n";
-	$self->print_txt_usage("");  # Use default resource bundle
-	die "\n";
-    }
-
-
-    $self->{'mm_file'} = $metadata_mapping; # relative to etc dir
-
-    # 14-05-02 To allow for proper inheritance of arguments - John Thompson
-    my $option_list = $self->{'option_list'};
-    push( @{$option_list}, $options );
+    my ($class) = shift (@_);
+    my ($pluginlist,$inputargs,$hashArgOptLists) = @_;
+    push(@$pluginlist, $class);
+
+    if(defined $arguments){ push(@{$hashArgOptLists->{"ArgList"}},@{$arguments});}
+    if(defined $options) { push(@{$hashArgOptLists->{"OptList"}},$options)};
+
+    my $self = (defined $hashArgOptLists)? new SplitPlug($pluginlist,$inputargs,$hashArgOptLists): new SplitPlug($pluginlist,$inputargs);
 
     return bless $self, $class;
@@ -101,5 +89,5 @@
     # read in the metadata mapping file
     my $mm_file =
-	&util::filename_cat( $ENV{'GSDLHOME'}, "etc", $self->{'mm_file'} );
+	&util::filename_cat( $ENV{'GSDLHOME'}, "etc", $self->{'metadata_mapping'} );
 
     if (!-e $mm_file)
@@ -107,10 +95,10 @@
 
 	my $msg = "MARCPlug ERROR: Can't locate mapping file \"" .
-	    $self->{'mm_file'} . "\".\n    This file should be at $mm_file\n" .
+	    $self->{'metadata_mapping'} . "\".\n    This file should be at $mm_file\n" .
 		"    No marc files can be processed.\n";
 
 	print $outhandle $msg;
 	print $failhandle $msg;
-	$self->{'mm_file'} = undef;
+	$self->{'metadata_mapping'} = undef;
 	# We pick up the error in process() if there is no $mm_file
 	# If we exit here, then pluginfo.pl will exit too!
@@ -222,5 +210,5 @@
     my $filename = &util::filename_cat($base_dir, $file);
 
-    if (! defined($self->{'mm_file'}))
+    if (! defined($self->{'metadata_mapping'}))
     {
 	print $outhandle "MARCPlug: no metadata file! Can't process $file\n";
Index: /trunk/gsdl/perllib/plugins/METSPlug.pm
===================================================================
--- /trunk/gsdl/perllib/plugins/METSPlug.pm	(revision 10217)
+++ /trunk/gsdl/perllib/plugins/METSPlug.pm	(revision 10218)
@@ -40,5 +40,5 @@
 
 sub BEGIN {
-    @ISA = ('XMLPlug');
+    @METSPlug::ISA = ('XMLPlug');
 }
 
@@ -56,10 +56,12 @@
 
 sub new {
-    my $class = shift (@_);
-    my $self = new XMLPlug ($class, @_);
-
-    # 14-05-02 To allow for proper inheritance of arguments - John Thompson
-    my $option_list = $self->{'option_list'};
-    push( @{$option_list}, $options );
+    my ($class) = shift (@_);
+    my ($pluginlist,$inputargs,$hashArgOptLists) = @_;
+    push(@$pluginlist, $class);
+
+    if(defined $arguments){ push(@{$hashArgOptLists->{"ArgList"}},@{$arguments});}
+    if(defined $options) { push(@{$hashArgOptLists->{"OptList"}},$options)};
+
+    my $self = (defined $hashArgOptLists)? new XMLPlug($pluginlist,$inputargs,$hashArgOptLists): new XMLPlug($pluginlist,$inputargs);
 
     $self->{'section'} = "";
Index: /trunk/gsdl/perllib/plugins/MP3Plug.pm
===================================================================
--- /trunk/gsdl/perllib/plugins/MP3Plug.pm	(revision 10217)
+++ /trunk/gsdl/perllib/plugins/MP3Plug.pm	(revision 10218)
@@ -66,20 +66,12 @@
 
 sub new {
-    my ($class) = @_;
-    my $self = new UnknownPlug ($class, @_);
-    $self->{'plugin_type'} = "MP3Plug";
-    # 14-05-02 To allow for proper inheritance of arguments - John Thompson
-    my $option_list = $self->{'option_list'};
-    push( @{$option_list}, $options );
-
-    if (!parsargv::parse(\@_, 
-			 q^assoc_images^, \$self->{'assoc_images'},
-			 q^applet_metadata^, \$self->{'applet_metadata'},
-			 q^metadata_fields/.*/Title,Artist,Genre^, \$self->{'metadata_fields'},
-			 "allow_extra_options")) {
-	print STDERR "\nIncorrect options passed to MP3Plug, check your collect.cfg configuration file\n";
-	$self->print_txt_usage("");  # Use default resource bundle
-        die "\n";
-    }
+    my ($class) = shift (@_);
+    my ($pluginlist,$inputargs,$hashArgOptLists) = @_;
+    push(@$pluginlist, $class);
+
+    if(defined $arguments){ push(@{$hashArgOptLists->{"ArgList"}},@{$arguments});}
+    if(defined $options) { push(@{$hashArgOptLists->{"OptList"}},$options)};
+
+    my $self = (defined $hashArgOptLists)? new UnknownPlug($pluginlist,$inputargs,$hashArgOptLists): new UnknownPlug($pluginlist,$inputargs);
 
     return bless $self, $class;
Index: /trunk/gsdl/perllib/plugins/NULPlug.pm
===================================================================
--- /trunk/gsdl/perllib/plugins/NULPlug.pm	(revision 10217)
+++ /trunk/gsdl/perllib/plugins/NULPlug.pm	(revision 10218)
@@ -57,19 +57,13 @@
 
 sub new {
-    my ($class) = @_;
-    my $self = new BasPlug ($class, @_);
-    $self->{'plugin_type'} = "NULPlug";
-    # 14-05-02 To allow for proper inheritance of arguments - John Thompson
-    my $option_list = $self->{'option_list'};
-    push( @{$option_list}, $options );
+    my ($class) = shift (@_);
+    my ($pluginlist,$inputargs,$hashArgOptLists) = @_;
+    push(@$pluginlist, $class);
 
-    if (!parsargv::parse(\@_, 
-			 "allow_extra_options")) {
-	print STDERR "\nIncorrect options passed to NULPlug, check your collect.cfg configuration file\n";
-	$self->print_txt_usage("");  # Use default resource bundle
-        die "\n";
-    }
+    if(defined $arguments){ push(@{$hashArgOptLists->{"ArgList"}},@{$arguments});}
+    if(defined $options) { push(@{$hashArgOptLists->{"OptList"}},$options)};
 
-
+    my $self = (defined $hashArgOptLists)? new BasPlug($pluginlist,$inputargs,$hashArgOptLists): new BasPlug($pluginlist,$inputargs);
+    
     return bless $self, $class;
 }
Index: /trunk/gsdl/perllib/plugins/OAIPlug.pm
===================================================================
--- /trunk/gsdl/perllib/plugins/OAIPlug.pm	(revision 10217)
+++ /trunk/gsdl/perllib/plugins/OAIPlug.pm	(revision 10218)
@@ -54,18 +54,12 @@
 
 sub new {
-    my $class = shift (@_);
-    my $self = new XMLPlug ($class, @_);
-    $self->{'plugin_type'} = "OAIPlug";
-    # 14-05-02 To allow for proper inheritance of arguments - John Thompson
-    my $option_list = $self->{'option_list'};
-    push( @{$option_list}, $options );
-
-    if (!parsargv::parse(\@_, 
-			 "allow_extra_options")) {
-
-	print STDERR "\nIncorrect options passed to OAIPlug, check your collect.cfg configuration file\n";
-	$self->print_txt_usage("");  # Use default resource bundle
-	die "\n";
-    }
+    my ($class) = shift (@_);
+    my ($pluginlist,$inputargs,$hashArgOptLists) = @_;
+    push(@$pluginlist, $class);
+
+    if(defined $arguments){ push(@{$hashArgOptLists->{"ArgList"}},@{$arguments});}
+    if(defined $options) { push(@{$hashArgOptLists->{"OptList"}},$options)};
+
+    my $self = (defined $hashArgOptLists)? new XMLPlug($pluginlist,$inputargs,$hashArgOptLists): new XMLPlug($pluginlist,$inputargs);
 
     return bless $self, $class;
Index: /trunk/gsdl/perllib/plugins/OggVorbisPlug.pm
===================================================================
--- /trunk/gsdl/perllib/plugins/OggVorbisPlug.pm	(revision 10217)
+++ /trunk/gsdl/perllib/plugins/OggVorbisPlug.pm	(revision 10218)
@@ -35,5 +35,5 @@
 
 sub BEGIN {
-    @ISA = ('UnknownPlug');
+    @OggVorbisPlug::ISA = ('UnknownPlug');
 }
 
@@ -65,19 +65,13 @@
 sub new
 {
-    my $class = shift(@_);
-
-    my $self = new UnknownPlug($class, @_);
-    $self->{'plugin_type'} = "OggVorbisPlug";
-
-    if (!parsargv::parse(\@_,
-			 q^add_technical_metadata^, \$self->{'add_technical_metadata'},
-			 "allow_extra_options")) {
-	die "\nIncorrect options passed to OggVorbisPlug, check your collect.cfg configuration file\n";
-    }
-
-    # To allow for proper inheritance of arguments
-    my $option_list = $self->{'option_list'};
-    push(@{$option_list}, $options);
-
+    my ($class) = shift(@_);
+    my ($pluginlist,$inputargs,$hashArgOptLists) = @_;
+    push(@$pluginlist, $class);
+    
+    if(defined $arguments){ push(@{$hashArgOptLists->{"ArgList"}},@{$arguments});}
+    if(defined $options) { push(@{$hashArgOptLists->{"OptList"}},$options)};
+    
+    my $self = (defined $hashArgOptLists)? new UnknownPlug($pluginlist,$inputargs,$hashArgOptLists): new UnknownPlug($pluginlist,$inputargs);
+    
     return bless $self, $class;
 }
Index: /trunk/gsdl/perllib/plugins/PDFPlug.pm
===================================================================
--- /trunk/gsdl/perllib/plugins/PDFPlug.pm	(revision 10217)
+++ /trunk/gsdl/perllib/plugins/PDFPlug.pm	(revision 10218)
@@ -70,49 +70,27 @@
 
 sub new {
-    my $class = shift (@_);
-
-    my ($noimages, $complex, $zoom, $use_sections, $nohidden);
-
-    my @args=@_;
-
-    if (!parsargv::parse(\@_, 
-			 q^noimages^, \$noimages,
-			 q^complex^, \$complex,
-			 q^zoom/\d+/2^, \$zoom,
-			 q^nohidden^, \$nohidden,
-			 q^use_sections^, \$use_sections,
-			 "allow_extra_options")) {
-
-	my $self = new ConvertToPlug($class, @_);
-	my $outhandle=$self->{'outhandle'};
-	print $outhandle "\nIncorrect options passed to PDFPlug, check your collect.cfg configuration file\n";
-	$self->print_txt_usage("");  # Use default resource bundle
-	exit 1;
-    }
-
-
-    if ($use_sections) {
-	push (@args, "-description_tags");
-    }
-
-    # following title_sub removes "Page 1" added by pdftohtml, and a leading
-    # "1", which is often the page number at the top of the page. Bad Luck
-    # if your document title actually starts with "1 " - is there a better way?
-
-    my $self = new ConvertToPlug ($class, @args, "-title_sub", '^(Page\s+\d+)?(\s*1\s+)?');
-    $self->{'plugin_type'} = "PDFPlug";
-    if ($use_sections) {
-	$self->{'use_sections'}=1;
-    }
-
-    # 14-05-02 To allow for proper inheritance of arguments - John Thompson
-    my $option_list = $self->{'option_list'};
-    push( @{$option_list}, $options );
+    my ($class) = shift (@_);
+    my ($pluginlist,$inputargs,$hashArgOptLists) = @_;
+    push(@$pluginlist, $class);
+
+    if(defined $arguments){ push(@{$hashArgOptLists->{"ArgList"}},@{$arguments});}
+    if(defined $options) { push(@{$hashArgOptLists->{"OptList"}},$options)};
+
+    push(@$inputargs,"-title_sub");
+    push(@$inputargs,'^(Page\s+\d+)?(\s*1\s+)?');
+
+    my $self = (defined $hashArgOptLists)? new ConvertToPlug($pluginlist,$inputargs,$hashArgOptLists): new ConvertToPlug($pluginlist,$inputargs);
+
+
+    if ($self->{"use_sections"}) {
+	$self->{"description_tags"} = 1;
+    }
 
     # these are passed through to gsConvert.pl by ConvertToPlug.pm
+    my $zoom = $self->{"zoom"};
     $self->{'convert_options'} = "-pdf_zoom $zoom";
-    $self->{'convert_options'} .= " -pdf_complex" if $complex;
-    $self->{'convert_options'} .= " -pdf_nohidden" if $nohidden;
-    $self->{'convert_options'} .= " -pdf_ignore_images" if $noimages;
+    $self->{'convert_options'} .= " -pdf_complex" if $self->{"complex"};
+    $self->{'convert_options'} .= " -pdf_nohidden" if $self->{"nohidden"};
+    $self->{'convert_options'} .= " -pdf_ignore_images" if $self->{"noimages"};
 
     # pdftohtml will always produce html files encoded as utf-8
Index: /trunk/gsdl/perllib/plugins/PPTPlug.pm
===================================================================
--- /trunk/gsdl/perllib/plugins/PPTPlug.pm	(revision 10217)
+++ /trunk/gsdl/perllib/plugins/PPTPlug.pm	(revision 10218)
@@ -49,16 +49,17 @@
 
 sub new {
-    my $class = shift (@_);
+    my ($class) = shift (@_);
+    my ($pluginlist,$inputargs,$hashArgOptLists) = @_;
+    push(@$pluginlist, $class);
 
-    my $self = new ConvertToPlug ($class, @_);
-    $self->{'plugin_type'} = "PPTPlug";
+    if(defined $arguments){ push(@{$hashArgOptLists->{"ArgList"}},@{$arguments});}
+    if(defined $options) { push(@{$hashArgOptLists->{"OptList"}},$options)};
+
+    my $self = (defined $hashArgOptLists)? new ConvertToPlug($pluginlist,$inputargs,$hashArgOptLists): new ConvertToPlug($pluginlist,$inputargs);
+
     # ppthtml outputs utf-8 already.
     if ($self->{'input_encoding'} eq "auto") {
 	$self->{'input_encoding'} = "utf8";
     }
-
-    # 14-05-02 To allow for proper inheritance of arguments - John Thompson
-    my $option_list = $self->{'option_list'};
-    push( @{$option_list}, $options );
 
     return bless $self, $class;
Index: /trunk/gsdl/perllib/plugins/PSPlug.pm
===================================================================
--- /trunk/gsdl/perllib/plugins/PSPlug.pm	(revision 10217)
+++ /trunk/gsdl/perllib/plugins/PSPlug.pm	(revision 10218)
@@ -62,23 +62,17 @@
 
 sub new {
-    my $class = shift (@_);
+    my ($class) = shift (@_);
+    my ($pluginlist,$inputargs,$hashArgOptLists) = @_;
+    push(@$pluginlist, $class);
 
-    # title_sub removes leading "Page 1" or "1 " from auto-extracted title.
+    push(@$inputargs,"-convert_to");
+    push(@$inputargs,"text");
+    push(@$inputargs,"-title_sub");
+    push(@$inputargs,'^(Page\s+\d+)?(\s*1\s+)?');
 
-    my $self = new ConvertToPlug ($class, "-convert_to", "text", @_ , "-title_sub", '^(Page\s+\d+)?(\s*1\s+)?');
-    $self->{'plugin_type'} = "PSPlug";
-    # 14-05-02 To allow for proper inheritance of arguments - John Thompson
-    my $option_list = $self->{'option_list'};
-    push( @{$option_list}, $options );
-    
-    if (!parsargv::parse(\@_, 
-			 q^extract_date^, \$self->{'extract_date'},
-			 q^extract_pages^, \$self->{'extract_pages'},
-			 q^extract_title^, \$self->{'extract_title'},
-			 "allow_extra_options")) {
-	print STDERR "\nIncorrect options passed to HTMLPlug, check your collect.cfg configuration file\n";
-	$self->print_txt_usage("");  # Use default resource bundle
-	die "\n";
-    }
+    if(defined $arguments){ push(@{$hashArgOptLists->{"ArgList"}},@{$arguments});}
+    if(defined $options) { push(@{$hashArgOptLists->{"OptList"}},$options)};
+
+    my $self = (defined $hashArgOptLists)? new ConvertToPlug($pluginlist,$inputargs,$hashArgOptLists): new ConvertToPlug($pluginlist,$inputargs);
 
     return bless $self, $class;
Index: /trunk/gsdl/perllib/plugins/PagedImgPlug.pm
===================================================================
--- /trunk/gsdl/perllib/plugins/PagedImgPlug.pm	(revision 10217)
+++ /trunk/gsdl/perllib/plugins/PagedImgPlug.pm	(revision 10218)
@@ -137,5 +137,5 @@
 
 sub BEGIN {
-    @ISA = ('XMLPlug');
+    @PagedImgPlug::ISA = ('XMLPlug');
 }
 
@@ -220,31 +220,12 @@
 
 sub new {
-    my ($class) = @_;
-    my $plugin_name = shift (@_);
-    $self = new XMLPlug ("PagedImgPlug", @_);
-
-    my $option_list = $self->{'option_list'};
-    push( @{$option_list}, $options );
-
-    if (!parsargv::parse(\@_,
-			 q^noscaleup^, \$self->{'noscaleup'},
-			 q^converttotype/.*/^, \$self->{'converttotype'},
-			 q^minimumsize/[0-9]*/100^, \$self->{'minimumsize'},
-
-			 q^thumbnailsize/[0-9]*/100^, \$self->{'thumbnailsize'},
-			 q^thumbnailtype/.*/gif^, \$self->{'thumbnailtype'},
-			 q^screenviewsize/[0-9]*/0^, \$self->{'screenviewsize'},
-			 q^screenviewtype/.*/jpg^, \$self->{'screenviewtype'},
-			 q^thumbnail^, \$self->{'thumbnail'},
-			 q^screenview^, \$self->{'screenview'},
-			 q^headerpage^, \$self->{'headerpage'},
-			 'documenttype/^(paged|hierarchy)$/paged', \$self->{'doctype'},
-			 "allow_extra_options")) {
-	
-	print STDERR "\nPagedImgPlug uses an incorrect option.\n";
-	print STDERR "Check your collect.cfg configuration file.\n";
-	$self->print_txt_usage("");  # Use default resource bundle
-	die "\n";
-    }
+    my ($class) = shift (@_);
+    my ($pluginlist,$inputargs,$hashArgOptLists) = @_;
+    push(@$pluginlist, $class);
+
+    if(defined $arguments){ push(@{$hashArgOptLists->{"ArgList"}},@{$arguments});}
+    if(defined $options) { push(@{$hashArgOptLists->{"OptList"}},$options)};
+
+    my $self = (defined $hashArgOptLists)? new XMLPlug($pluginlist,$inputargs,$hashArgOptLists): new XMLPlug($pluginlist,$inputargs);
 
     return bless $self, $class;
@@ -768,5 +749,5 @@
     $self->{'num_pages'} = 0;
     my $topsection = $doc_obj->get_top_section();
-    if ($self->{'doctype'} eq 'paged') {
+    if ($self->{'documenttype'} eq 'paged') {
 	# set the gsdlthistype metadata to Paged - this ensures this document will
 	# be treated as a Paged doc, even if Titles are not numeric
@@ -806,5 +787,5 @@
     my $topsection = $doc_obj->get_top_section();
 
-    if ($self->{'doctype'} eq 'paged') {
+    if ($self->{'documenttype'} eq 'paged') {
 	# set the gsdlthistype metadata to Paged - this ensures this document will
 	# be treated as a Paged doc, even if Titles are not numeric
Index: /trunk/gsdl/perllib/plugins/ProCitePlug.pm
===================================================================
--- /trunk/gsdl/perllib/plugins/ProCitePlug.pm	(revision 10217)
+++ /trunk/gsdl/perllib/plugins/ProCitePlug.pm	(revision 10218)
@@ -74,16 +74,12 @@
 sub new
 {
-    my $class = shift(@_);
-
-    my $self = new SplitPlug($class, @_);
-    if (!parsargv::parse(\@_,
-			 "allow_extra_options")) {
-	die "\nIncorrect options passed to ProCitePlug, check your collect.cfg configuration file\n";
-    }
-
-    # To allow for proper inheritance of arguments
-    my $option_list = $self->{'option_list'};
-    push(@{$option_list}, $options);
-    $self->{'plugin_type'} = "ProCitePlug";
+    my ($class) = shift (@_);
+    my ($pluginlist,$inputargs,$hashArgOptLists) = @_;
+    push(@$pluginlist, $class);
+
+    if(defined $arguments){ push(@{$hashArgOptLists->{"ArgList"}},@{$arguments});}
+    if(defined $options) { push(@{$hashArgOptLists->{"OptList"}},$options)};
+
+    my $self = (defined $hashArgOptLists)? new SplitPlug($pluginlist,$inputargs,$hashArgOptLists): new SplitPlug($pluginlist,$inputargs);
 
     return bless $self, $class;
Index: /trunk/gsdl/perllib/plugins/RTFPlug.pm
===================================================================
--- /trunk/gsdl/perllib/plugins/RTFPlug.pm	(revision 10217)
+++ /trunk/gsdl/perllib/plugins/RTFPlug.pm	(revision 10218)
@@ -49,10 +49,12 @@
 
 sub new {
-    my $class = shift (@_);
-    my $self = new ConvertToPlug ($class, @_);
-    $self->{'plugin_type'}="RTFPlug";
-    # 14-05-02 To allow for proper inheritance of arguments - John Thompson
-    my $option_list = $self->{'option_list'};
-    push( @{$option_list}, $options );
+    my ($class) = shift (@_);
+    my ($pluginlist,$inputargs,$hashArgOptLists) = @_;
+    push(@$pluginlist, $class);
+
+    if(defined $arguments){ push(@{$hashArgOptLists->{"ArgList"}},@{$arguments});}
+    if(defined $options) { push(@{$hashArgOptLists->{"OptList"}},$options)};
+
+    my $self = (defined $hashArgOptLists)? new ConvertToPlug($pluginlist,$inputargs,$hashArgOptLists): new ConvertToPlug($pluginlist,$inputargs);
 
     return bless $self, $class;
Index: /trunk/gsdl/perllib/plugins/RecPlug.pm
===================================================================
--- /trunk/gsdl/perllib/plugins/RecPlug.pm	(revision 10217)
+++ /trunk/gsdl/perllib/plugins/RecPlug.pm	(revision 10218)
@@ -131,24 +131,14 @@
 
 my ($self);
+
 sub new {
-    my $class = shift (@_);
-    
-    # $self is global for use within subroutines called by XML::Parser
-    $self = new BasPlug ($class, @_);
-    
-    # 14-05-02 To allow for proper inheritance of arguments - John Thompson
-    my $option_list = $self->{'option_list'};
-    push( @{$option_list}, $options );
-
-    if (!parsargv::parse(\@_,
-			 q^use_metadata_files^, \$self->{'use_metadata_files'},
-			 q^recheck_directories^, \$self->{'recheck_directories'},
-			 "allow_extra_options")) {
-	print STDERR "\nRecPlug uses an incorrect option.\n";
-	print STDERR "Check your collect.cfg configuration file.\n\n";
-	$self->print_txt_usage("");  # Use default resource bundle
-	die "\n";
-    }
-    
+    my ($class) = shift (@_);
+    my ($pluginlist,$inputargs,$hashArgOptLists) = @_;
+    push(@$pluginlist, $class);
+
+    if(defined $arguments){ push(@{$hashArgOptLists->{"ArgList"}},@{$arguments});}
+    if(defined $options) { push(@{$hashArgOptLists->{"OptList"}},$options)};
+
+    $self = (defined $hashArgOptLists)? new BasPlug($pluginlist,$inputargs,$hashArgOptLists): new BasPlug($pluginlist,$inputargs);
     if ($self->{'use_metadata_files'}) {
 	# create XML::Parser object for parsing metadata.xml files
@@ -157,8 +147,9 @@
 						    'Doctype' => \&Doctype
 						    });
+
 	$self->{'parser'} = $parser;
 	$self->{'in_filename'} = 0;
     }
-
+    
     $self->{'subdir_extrametakeys'} = {};
 
@@ -425,4 +416,5 @@
 	# Next add metadata read in XML files (if it is supplied)
 	if ($additionalmetadata == 1) {
+	    
 	    my ($filespec, $mdref);
 	    foreach $filespec (@extrametakeys) {
@@ -498,5 +490,5 @@
 sub StartTag {
     my ($expat, $element) = @_;
-    
+
     if ($element eq "FileSet") {
 	$self->{'saved_targets'} = [];
Index: /trunk/gsdl/perllib/plugins/ReferPlug.pm
===================================================================
--- /trunk/gsdl/perllib/plugins/ReferPlug.pm	(revision 10217)
+++ /trunk/gsdl/perllib/plugins/ReferPlug.pm	(revision 10218)
@@ -102,10 +102,12 @@
 
 sub new {
-    my $class = shift (@_);
-    my $self = new SplitPlug ($class, @_);
-    $self->{'plugin_type'} = "ReferPlug";
-    # 14-05-02 To allow for proper inheritance of arguments - John Thompson
-    my $option_list = $self->{'option_list'};
-    push( @{$option_list}, $options );
+    my ($class) = shift (@_);
+    my ($pluginlist,$inputargs,$hashArgOptLists) = @_;
+    push(@$pluginlist, $class);
+
+    if(defined $arguments){ push(@{$hashArgOptLists->{"ArgList"}},@{$arguments});}
+    if(defined $options) { push(@{$hashArgOptLists->{"OptList"}},$options)};
+
+    my $self = (defined $hashArgOptLists)? new SplitPlug($pluginlist,$inputargs,$hashArgOptLists): new SplitPlug($pluginlist,$inputargs);
 
     return bless $self, $class;
Index: /trunk/gsdl/perllib/plugins/RogPlug.pm
===================================================================
--- /trunk/gsdl/perllib/plugins/RogPlug.pm	(revision 10217)
+++ /trunk/gsdl/perllib/plugins/RogPlug.pm	(revision 10218)
@@ -51,10 +51,12 @@
 
 sub new {
-    my ($class) = @_;
-    $self = new BasPlug ();
-    $self->{'plugin_type'} = "RogPlug";
-    # 14-05-02 To allow for proper inheritance of arguments - John Thompson
-    my $option_list = $self->{'option_list'};
-    push( @{$option_list}, $options );
+    my ($class) = shift (@_);
+    my ($pluginlist,$inputargs,$hashArgOptLists) = @_;
+    push(@$pluginlist, $class);
+
+    if(defined $arguments){ push(@{$hashArgOptLists->{"ArgList"}},@{$arguments});}
+    if(defined $options) { push(@{$hashArgOptLists->{"OptList"}},$options)};
+
+    my $self = (defined $hashArgOptLists)? new BasPlug($pluginlist,$inputargs,$hashArgOptLists): new BasPlug($pluginlist,$inputargs);
 
     return bless $self, $class;
Index: /trunk/gsdl/perllib/plugins/SRCPlug.pm
===================================================================
--- /trunk/gsdl/perllib/plugins/SRCPlug.pm	(revision 10217)
+++ /trunk/gsdl/perllib/plugins/SRCPlug.pm	(revision 10218)
@@ -71,21 +71,13 @@
 
 sub new {
-    my ($class) = @_;
-    my $self = new BasPlug ($class, @_);
-    $self->{'plugin_type'} = "SRCPlug";
-    # 14-05-02 To allow for proper inheritance of arguments - John Thompson
-    my $option_list = $self->{'option_list'};
-    push( @{$option_list}, $options );
-
-    if (!parsargv::parse(\@_,
-			 q^remove_prefix/(\S+)/^, \$self->{'remove_prefix'},
-			 "allow_extra_options"
-			 )
-	) {
-        print STDERR "\nIncorrect options passed to SRCPlug, ";
-        print STDERR "check your collect.cfg configuration file\n";
-	$self->print_txt_usage("");  # Use default resource bundle
-        die "\n";
-    }
+    my ($class) = shift (@_);
+    my ($pluginlist,$inputargs,$hashArgOptLists) = @_;
+    push(@$pluginlist, $class);
+
+    if(defined $arguments){ push(@{$hashArgOptLists->{"ArgList"}},@{$arguments});}
+    if(defined $options) { push(@{$hashArgOptLists->{"OptList"}},$options)};
+
+    my $self = (defined $hashArgOptLists)? new BasPlug($pluginlist,$inputargs,$hashArgOptLists): new BasPlug($pluginlist,$inputargs);
+
     return bless $self, $class;
 }
Index: /trunk/gsdl/perllib/plugins/SplitPlug.pm
===================================================================
--- /trunk/gsdl/perllib/plugins/SplitPlug.pm	(revision 10217)
+++ /trunk/gsdl/perllib/plugins/SplitPlug.pm	(revision 10218)
@@ -54,5 +54,6 @@
 	'desc' => "{SplitPlug.split_exp}",
 	'type' => "regexp",
-	'deft' => &get_default_split_exp(),
+	#'deft' => &get_default_split_exp(),
+	'deft' => "",
 	'reqd' => "no" } ];
 
@@ -65,20 +66,12 @@
 
 sub new {
-    my ($class) = @_;
-    $self = new BasPlug($class, @_);
-
-    $self->{'plugin_type'} = "SplitPlug";
-    
-    # 14-05-02 To allow for proper inheritance of arguments - John Thompson
-    my $option_list = $self->{'option_list'};
-    push( @{$option_list}, $options );
-    
-    if (!parsargv::parse(\@_, 
-			 q^split_exp/.*/^, \$self->{'split_exp'},
-			 "allow_extra_options")) {
-	print STDERR "\nIncorrect options passed to $class.";
-	print STDERR "\nCheck your collect.cfg configuration file\n";
-	die "\n";
-    }
+    my ($class) = shift (@_);
+    my ($pluginlist,$inputargs,$hashArgOptLists) = @_;
+    push(@$pluginlist, $class);
+
+    if(defined $arguments){ push(@{$hashArgOptLists->{"ArgList"}},@{$arguments});}
+    if(defined $options) { push(@{$hashArgOptLists->{"OptList"}},$options)};
+
+    my $self = (defined $hashArgOptLists)? new BasPlug($pluginlist,$inputargs,$hashArgOptLists): new BasPlug($pluginlist,$inputargs);
 
     $self->{'textcat_store'} = {};
Index: /trunk/gsdl/perllib/plugins/TEXTPlug.pm
===================================================================
--- /trunk/gsdl/perllib/plugins/TEXTPlug.pm	(revision 10217)
+++ /trunk/gsdl/perllib/plugins/TEXTPlug.pm	(revision 10218)
@@ -59,19 +59,12 @@
 
 sub new {
-    my ($class) = @_;
-    my $self = new BasPlug ($class, @_);
-    $self->{'plugin_type'} = "TEXTPlug";
-    # 14-05-02 To allow for proper inheritance of arguments - John Thompson
-    my $option_list = $self->{'option_list'};
-    push( @{$option_list}, $options );
+    my ($class) = shift (@_);
+    my ($pluginlist,$inputargs,$hashArgOptLists) = @_;
+    push(@$pluginlist, $class);
 
-    if (!parsargv::parse(\@_, 
-			 q^title_sub/.*/^, \$self->{'title_sub'},
-			 "allow_extra_options")) {
-	print STDERR "\nIncorrect options passed to TEXTPlug, check your collect.cfg configuration file\n";
-	$self->print_txt_usage("");  # Use default resource bundle
-        die "\n";
-    }
+    if(defined $arguments){ push(@{$hashArgOptLists->{"ArgList"}},@{$arguments});}
+    if(defined $options) { push(@{$hashArgOptLists->{"OptList"}},$options)};
 
+    my $self = (defined $hashArgOptLists)? new BasPlug($pluginlist,$inputargs,$hashArgOptLists): new BasPlug($pluginlist,$inputargs);
 
     return bless $self, $class;
Index: /trunk/gsdl/perllib/plugins/UnknownPlug.pm
===================================================================
--- /trunk/gsdl/perllib/plugins/UnknownPlug.pm	(revision 10217)
+++ /trunk/gsdl/perllib/plugins/UnknownPlug.pm	(revision 10218)
@@ -58,4 +58,7 @@
 use BasPlug;
 use parsargv;
+#$%^
+use parse2;
+
 
 
@@ -94,21 +97,12 @@
 
 sub new {
-    my ($class) = @_;
-    my $self = new BasPlug ($class, @_);
-    $self->{'plugin_type'} = "UnknownPlug";
-    # 14-05-02 To allow for proper inheritance of arguments - John Thompson
-    my $option_list = $self->{'option_list'};
-    push( @{$option_list}, $options );
-
-    if (!parsargv::parse(\@_, 
-			 q^assoc_field/.*/^, \$self->{'assoc_field'},
-			 q^file_format/.*/^, \$self->{'file_format'},
-			 q^mime_type/.*/^, \$self->{'mime_type'},
-			 q^process_extension/.*/^, \$self->{'process_extension'},
-			 "allow_extra_options")) {
-	print STDERR "\nIncorrect options passed to UnknownPlug, check your collect.cfg configuration file\n";
-	$self->print_txt_usage("");  # Use default resource bundle
-        die "\n";
-    }
+    my ($class) = shift (@_);
+    my ($pluginlist,$inputargs,$hashArgOptLists) = @_;
+    push(@$pluginlist, $class);
+
+    if(defined $arguments){ push(@{$hashArgOptLists->{"ArgList"}},@{$arguments});}
+    if(defined $options) { push(@{$hashArgOptLists->{"OptList"}},$options)};
+
+    my $self = (defined $hashArgOptLists)? new BasPlug($pluginlist,$inputargs,$hashArgOptLists): new BasPlug($pluginlist,$inputargs);
 
     # "-process_extension" is a simpler alternative to -process_exp for non-regexp people
Index: /trunk/gsdl/perllib/plugins/W3ImgPlug.pm
===================================================================
--- /trunk/gsdl/perllib/plugins/W3ImgPlug.pm	(revision 10217)
+++ /trunk/gsdl/perllib/plugins/W3ImgPlug.pm	(revision 10218)
@@ -225,35 +225,13 @@
 
 sub new {
-    my $class = shift (@_);
-    my $self = new HTMLPlug ($class, @_);
-    $self->{'plugin_type'} = "W3ImgPlug";
-    # 14-05-02 To allow for proper inheritance of arguments - John Thompson
-    my $option_list = $self->{'option_list'};
-    push( @{$option_list}, $options );
-
-    if (!parsargv::parse(\@_,
-			 q^aggressiveness/\d/3^, \$self->{'aggressiveness'},
-			 q^index_pages^, \$self->{'index_pages'},
-			 q^no_cache_images^, \$self->{'no_cache_images'},
-			 q^min_size/\d*/2000^, \$self->{'min_img_filesize'},
-			 q^min_width/\d*/50^, \$self->{'min_img_width'},
-			 q^min_height/\d*/50^, \$self->{'min_img_height'},
-			 q^thumb_size/\d*/100^, \$self->{'thumbnail_size'},
-			 q^convert_params/.*/ ^, \$self->{'img_convert_param'},
-			 q^max_near_text/\d*/400^, \$self->{'maxtext'},
-			 q^min_near_text/\d*/10^, \$self->{'mintext'},
-			 q^smallpage_threshold/\d*/2048^, \$self->{'smallpage_threshold'},
-			 q^textrefs_threshold/\d*/2^, \$self->{'textref_threshold'},
-			 q^caption_length/\d*/80^, \$self->{'caption_len'},
-			 q^neartext_length/\d*/300^, \$self->{'neartext_len'},
-			 q^document_text^, \$self->{'document_text'},
-			 "allow_extra_options"
-			 )) { 
-
-	print STDERR "\nIncorrect options passed to W3ImgPlug, check your collect.cfg configuration file\n";
-	$self->print_txt_usage("");  # Use default resource bundle
-	die "\n";
-    }
-    
+    my ($class) = shift (@_);
+    my ($pluginlist,$inputargs,$hashArgOptLists) = @_;
+    push(@$pluginlist, $class);
+
+    if(defined $arguments){ push(@{$hashArgOptLists->{"ArgList"}},@{$arguments});}
+    if(defined $options) { push(@{$hashArgOptLists->{"OptList"}},$options)};
+
+    my $self = (defined $hashArgOptLists)? new HTMLPlug($pluginlist,$inputargs,$hashArgOptLists): new HTMLPlug($pluginlist,$inputargs);
+
     # init class variables
     $self->{'textref'} = undef; # init by read_file fn
@@ -399,11 +377,11 @@
     }
 
-    if ( $self->{'neartext_len'} > $self->{'maxtext'} ) {
-	$self->{'maxtext'} = $self->{'neartext_len'} * 1.33;
-	print {$self->{'outhandle'}} "W3ImgPlug: Warning: adjusted max_text to $self->{'maxtext'}\n";
+    if ( $self->{'neartext_length'} > $self->{'max_near_text'} ) {
+	$self->{'max_near_text'} = $self->{'neartext_length'} * 1.33;
+	print {$self->{'outhandle'}} "W3ImgPlug: Warning: adjusted max_text to $self->{'max_near_text'}\n";
     } 
-    if ( $self->{'caption_len'} > $self->{'maxtext'} ) {
-	$self->{'maxtext'} = $self->{'caption_len'} * 1.33;
-	print {$self->{'outhandle'}} "W3ImgPlug: Warning: adjusted max_text to $self->{'maxtext'}\n";
+    if ( $self->{'caption_length'} > $self->{'max_near_text'} ) {
+	$self->{'max_near_text'} = $self->{'caption_length'} * 1.33;
+	print {$self->{'outhandle'}} "W3ImgPlug: Warning: adjusted max_text to $self->{'max_near_text'}\n";
     }
 
@@ -492,5 +470,5 @@
     } else { ($crcid) = `cksum $filepath` =~ /^(\d+)/; }
     $thumbfp = "$tndir/tn_$crcid.jpg";
-    `convert -flatten -filter Hanning $self->{'img_convert_param'} -geometry "$self->{'thumbnail_size'}x$self->{'thumbnail_size'}>" $filepath $thumbfp` unless -e $thumbfp;
+    `convert -flatten -filter Hanning $self->{'convert_params'} -geometry "$self->{'thumb_size'}x$self->{'thumb_size'}>" $filepath $thumbfp` unless -e $thumbfp;
     if ( ! (-e $thumbfp) ) {
 	print STDERR "W3ImgPlug: 'convert' failed. Check ImageMagicK binaries are installed and working correctly\n"; return 0; 
@@ -532,5 +510,5 @@
 	    # textual references
 	    if ( $aggr  == 5 || $aggr >= 7) {
-		if ( length($relreltext) > ($self->{'caption_len'} * 2) )  {
+		if ( length($relreltext) > ($self->{'caption_length'} * 2) )  {
 		    $reltext .= $self->get_textrefs($relreltext, $textref, $prevpos, $imgs->{$id}{'pos'}, $nextpos); }
 		else {
@@ -610,5 +588,5 @@
 
     # extract larger context
-    $maxtext = $self->{'maxtext'};
+    $maxtext = $self->{'max_near_text'};
     $startpos = $pos - ($maxtext * 4);
     $context_size = $maxtext*10;
@@ -663,5 +641,5 @@
     }
     foreach $sentence ( keys %sentences ) {
-	if ($sentences{$sentence} < $self->{'textref_threshold'}) {
+	if ($sentences{$sentence} < $self->{'textrefs_threshold'}) {
 	    delete $sentences{$sentence};
 	}
@@ -681,9 +659,9 @@
 	$startpos, $context, $context_size);
     
-    $mintext = $self->{'mintext'};
-    $goodlen = $self->{'caption_len'};
+    $mintext = $self->{'min_near_text'};
+    $goodlen = $self->{'caption_length'};
 
     # extract a context to extract near text from (faster)
-    $context_size = $self->{'maxtext'}*3;
+    $context_size = $self->{'max_near_text'}*3;
     $startpos = $pos - ($context_size / 2);
     if ($startpos < $prevpos ) { $startpos = $prevpos }
@@ -762,10 +740,10 @@
     # if bound_tag too far from the image, then prob not caption
     # (note: have to allow for tags, so multiply by 3
-    if ( $etag && length($nt[0]) < ($self->{'caption_len'} * 3) ) { 
+    if ( $etag && length($nt[0]) < ($self->{'caption_length'} * 3) ) { 
 	if ( $nt[0] =~ /<\/$etag>/si ) {
 	    # the whole caption is above the image: <tag>text</tag><img>
 	    ($nt[0]) =~ /<(?:$etag)[\s]?.*?>(.*?)<\/$etag>/is;
 	    $nt[0] = $self->strip_tags($nt[0]);
-	    if ( length($nt[0]) > $self->{'mintext'} ) { 
+	    if ( length($nt[0]) > $self->{'min_near_text'} ) { 
 		$gotcap = 1;
 		$nt[1] = ""; 
@@ -776,5 +754,5 @@
 	    ($nt[1]) = $nt[1] =~ /(.*?)<\/$etag>/si;
 	    $nt[0] = $self->strip_tags($nt[0] . $nt[1]);
-	    if ( length($nt[0]) > $self->{'mintext'} ) { 
+	    if ( length($nt[0]) > $self->{'min_near_text'} ) { 
 		$gotcap = 2;
 		$nt[1] = "";
@@ -818,7 +796,7 @@
     $bestlen[0] = $bestlen[1] = 0; $bestlen[2] = $bdist = 999999;
     $best[0] = $best[1] = $best[2] = "";
-    $maxtext = $self->{'maxtext'};
-    $mintext = $self->{'mintext'};
-    $goodlen = $self->{'neartext_len'}; 
+    $maxtext = $self->{'max_near_text'};
+    $mintext = $self->{'min_near_text'};
+    $goodlen = $self->{'neartext_length'}; 
 
     # extract a context to extract near text from (faster)
@@ -945,7 +923,7 @@
     # either side of the tag (by word boundary)
     return "" if ( ! exists $imgs->{$fp}{'rawpos'} );
-    $startpos = $imgs->{$fp}{'rawpos'} - (($self->{'maxtext'} / 2) + 20);
+    $startpos = $imgs->{$fp}{'rawpos'} - (($self->{'max_near_text'} / 2) + 20);
     if ( $startpos < 0 ) { $startpos = 0 }
-    $rawtext = substr $self->{'plaintext'}, $startpos, $self->{'maxtext'} + 20;
+    $rawtext = substr $self->{'plaintext'}, $startpos, $self->{'max_near_text'} + 20;
     $rawtext =~ s/\s\s/ /g;
 
@@ -1010,7 +988,7 @@
 	}
 	$filesize = (-s $abspath);
-	if ( $filesize >= $self->{'min_img_filesize'} 
-	    && ( $width >= $self->{'min_img_width'} ) 
-	    && ( $height >= $self->{'min_img_height'} ) ) {
+	if ( $filesize >= $self->{'min_size'} 
+	    && ( $width >= $self->{'min_width'} ) 
+	    && ( $height >= $self->{'min_height'} ) ) {
 	    
 	   $imgs->{$filepath}{'exists'} = 1;
Index: /trunk/gsdl/perllib/plugins/WordPlug.pm
===================================================================
--- /trunk/gsdl/perllib/plugins/WordPlug.pm	(revision 10217)
+++ /trunk/gsdl/perllib/plugins/WordPlug.pm	(revision 10218)
@@ -48,13 +48,14 @@
 
 sub new {
-    my $class = shift (@_);
-    
-    my $self = new ConvertToPlug ($class, @_);
-    $self->{'plugin_type'} = "WordPlug";
-    # 14-05-02 To allow for proper inheritance of arguments - John Thompson
-    my $option_list = $self->{'option_list'};
-    push( @{$option_list}, $options );
+    my ($class) = shift (@_);
+    my ($pluginlist,$inputargs,$hashArgOptLists) = @_;
+    push(@$pluginlist, $class);
 
-    # wvWare will always produce html files encoded as utf-8
+    if(defined $arguments){ push(@{$hashArgOptLists->{"ArgList"}},@{$arguments});}
+    if(defined $options) { push(@{$hashArgOptLists->{"OptList"}},$options)};
+
+    my $self = (defined $hashArgOptLists)? new ConvertToPlug($pluginlist,$inputargs,$hashArgOptLists): new ConvertToPlug($pluginlist,$inputargs);
+
+     # wvWare will always produce html files encoded as utf-8
     if ($self->{'input_encoding'} eq "auto") {
 	$self->{'input_encoding'} = "utf8";
Index: /trunk/gsdl/perllib/plugins/XMLPlug.pm
===================================================================
--- /trunk/gsdl/perllib/plugins/XMLPlug.pm	(revision 10217)
+++ /trunk/gsdl/perllib/plugins/XMLPlug.pm	(revision 10218)
@@ -28,4 +28,6 @@
 use BasPlug;
 use doc;
+#$%^
+use parse2;
 
 sub BEGIN {
@@ -57,22 +59,13 @@
 our ($self);
 sub new {
-    my $class = shift (@_);
-
+    my ($class) = shift (@_);
+    my ($pluginlist,$inputargs,$hashArgOptLists) = @_;
+    push(@$pluginlist, $class);
+
+    if(defined $arguments){ push(@{$hashArgOptLists->{"ArgList"}},@{$arguments});}
+    if(defined $options) { push(@{$hashArgOptLists->{"OptList"}},$options)};
+    
     # $self is global for use within subroutines called by XML::Parser
-    $self = new BasPlug ($class, @_);
-    $self->{'plugin_type'} = "XMLPlug";
-    # 14-05-02 To allow for proper inheritance of arguments - John Thompson
-    my $option_list = $self->{'option_list'};
-    push( @{$option_list}, $options );
-    
-    if (!parsargv::parse(\@_, 
-			 q^xslt/.*/^, \$self->{'xslt'},
-			 "allow_extra_options")) {
-
-	print STDERR "\nIncorrect options passed to XSLTPlug, check your collect.cfg configuration file\n";
-	$self->print_txt_usage("");  # Use default resource bundle
-	die "\n";
-    }
-
+    $self = (defined $hashArgOptLists)? new BasPlug($pluginlist,$inputargs,$hashArgOptLists): new BasPlug($pluginlist,$inputargs);
 
     my $parser = new XML::Parser('Style' => 'Stream',
@@ -82,8 +75,5 @@
 						'Doctype' => \&Doctype,
 						'Default' => \&Default
-						});
-
-    
-				
+						});  
     $self->{'parser'} = $parser;
 
Index: /trunk/gsdl/perllib/plugins/ZIPPlug.pm
===================================================================
--- /trunk/gsdl/perllib/plugins/ZIPPlug.pm	(revision 10217)
+++ /trunk/gsdl/perllib/plugins/ZIPPlug.pm	(revision 10218)
@@ -43,5 +43,4 @@
 # tar (for tar) 
 
-# 12/05/02 Added usage datastructure - John Thompson
 
 package ZIPPlug;
@@ -51,4 +50,6 @@
 use util;
 use Cwd;
+#$%^
+use parse2;
 
 
@@ -71,23 +72,19 @@
 
 sub new {
-    my ($class) = @_;
-    my $self = new BasPlug ("ZIPPlug", @_);
-    $self->{'plugin_type'} = "ZIPPlug";
-
-    # 14-05-02 To allow for proper inheritance of arguments - John Thompson
-    my $option_list = $self->{'option_list'};
-    push( @{$option_list}, $options );
-
-    if (!parsargv::parse(\@_, 
-			 q^process_exp/.*/^, \$self->{'process_exp'},
-			 "allow_extra_options")) {
-	print STDERR "\nIncorrect options passed to ZIPPlug, check your collect.cfg configuration file\n";
-	$self->print_txt_usage("");  # Use default resource bundle
-        die "\n";
-    }
+
+    my ($class) = shift (@_);
+    my ($pluginlist,$inputargs,$hashArgOptLists) = @_;
+    push(@$pluginlist, $class);
+
+    if(defined $arguments){ push(@{$hashArgOptLists->{"ArgList"}},@{$arguments});}
+    if(defined $options) { push(@{$hashArgOptLists->{"OptList"}},$options)};
+
+    my $self = (defined $hashArgOptLists)? new BasPlug($pluginlist,$inputargs,$hashArgOptLists): new BasPlug($pluginlist,$inputargs);
 
     # BasPlug is explicitly set not to set process_exp if recursive plugin
     # Not sure of this reasoning.  Want it to be set in ZIPPlug, so explicitly
     # pass it in as default value
+    
+    ## do we need this???? --kjdon
     if (!$self->{'process_exp'}) {
 	$self->{'process_exp'} = get_default_process_exp();
Index: /trunk/gsdl/perllib/printusage.pm
===================================================================
--- /trunk/gsdl/perllib/printusage.pm	(revision 10217)
+++ /trunk/gsdl/perllib/printusage.pm	(revision 10218)
@@ -101,4 +101,9 @@
 	}
 
+	# If the option has a charactor length field, display this
+	if (defined($option->{'char_length'})) {
+	    &gsprintf(STDERR, "      <Charactor Length>$option->{'char_length'}</Charactor Length>\n");
+	}
+
 	# If the option has a range field, display this
 	if (defined($option->{'range'})) {
@@ -125,14 +130,14 @@
 	    }
 
-	    # Special case for 'input_encoding'
-	    if ($optionname =~ m/^input_encoding$/i) {
-		my $e = $encodings::encodings;
-		foreach my $enc (sort {$e->{$a}->{'name'} cmp $e->{$b}->{'name'}} keys (%$e)) {
-		    &gsprintf(STDERR, "        <Value>\n");
-		    &gsprintf(STDERR, "          <Name>$enc</Name>\n");
-		    &gsprintf(STDERR, "          <Desc>$e->{$enc}->{'name'}</Desc>\n");
-		    &gsprintf(STDERR, "        </Value>\n");
-		}
-	    }
+#	    # Special case for 'input_encoding'
+#	    if ($optionname =~ m/^input_encoding$/i) {
+#		my $e = $encodings::encodings;
+#		foreach my $enc (sort {$e->{$a}->{'name'} cmp $e->{$b}->{'name'}} keys (%$e)) {
+#		    &gsprintf(STDERR, "        <Value>\n");
+#		    &gsprintf(STDERR, "          <Name>$enc</Name>\n");
+#		    &gsprintf(STDERR, "          <Desc>$e->{$enc}->{'name'}</Desc>\n");
+#		    &gsprintf(STDERR, "        </Value>\n");
+#		}
+#	    }
 
 	    &gsprintf(STDERR, "      </List>\n");
@@ -246,16 +251,16 @@
 	}
 
-	# Special case for 'input_encoding'
-	if ($optionname =~ m/^input_encoding$/i) {
-	    my $e = $encodings::encodings;
-	    foreach my $enc (sort {$e->{$a}->{'name'} cmp $e->{$b}->{'name'}} keys (%$e)) {
-		&gsprintf(STDERR, " " x $optiondescoffset);
-		&gsprintf(STDERR, "$enc:");
-
-		my $encodingdesc = $e->{$enc}->{'name'};
-		&display_text_in_column($encodingdesc, $optiondescoffset + 2,
-					$optiondescoffset + length("$enc:"), 80);
-	    }
-	}
+#	# Special case for 'input_encoding'
+#	if ($optionname =~ m/^input_encoding$/i) {
+#	    my $e = $encodings::encodings;
+#	    foreach my $enc (sort {$e->{$a}->{'name'} cmp $e->{$b}->{'name'}} keys (%$e)) {
+#		&gsprintf(STDERR, " " x $optiondescoffset);
+#		&gsprintf(STDERR, "$enc:");
+#
+#		my $encodingdesc = $e->{$enc}->{'name'};
+#		&display_text_in_column($encodingdesc, $optiondescoffset + 2,
+#					$optiondescoffset + length("$enc:"), 80);
+#	    }
+#	}
 
 	# Add a blank line to separate options
