Index: trunk/gsdl/perllib/classify/GenericList.pm
===================================================================
--- trunk/gsdl/perllib/classify/GenericList.pm	(revision 12893)
+++ trunk/gsdl/perllib/classify/GenericList.pm	(revision 12894)
@@ -89,5 +89,4 @@
 
     my $self = new BasClas($classifierslist, $inputargs, $hashArgOptLists);
-    $self->{'OIDs'} = [];
 
     if ($self->{'info_only'}) {
@@ -96,25 +95,17 @@
     }
 
-    my $metadata = $self->{'metadata'};
-    my $buttonname = $self->{'buttonname'};
-    my $partition_type_within_level = $self->{'partition_type_within_level'};
-    my $partition_size_within_level = $self->{'partition_size_within_level'};
-    my $sort_leaf_nodes_using = $self->{'sort_leaf_nodes_using'};
-
     # The metadata elements to use (required)
-    # print STDERR "Creating new GenericList for $metadata...\n";
-    if (!$metadata) {
+    if (!$self->{'metadata'}) {
 	die "Error: No metadata fields specified for GenericList.\n";
     }
-    my @metadata_groups = split(/\//, $metadata);
+    my @metadata_groups = split(/\//, $self->{'metadata'});
     $self->{'metadata_groups'} = \@metadata_groups;
 
-    # The classifier button name
-    if (!$buttonname) {
-	# Default: the first metadata element specified
-	my $firstmetagroupfirstelem = (split(/\;/, $metadata_groups[0]))[0];
-	$buttonname = $self->generate_title_from_metadata($firstmetagroupfirstelem);
-    }
-    $self->{'title'} = $buttonname;
+    # The classifier button name (default: the first metadata element specified)
+    if (!$self->{'buttonname'}) {
+	my $first_metadata_group = $metadata_groups[0];
+	my $first_metadata_element = (split(/\;/, $first_metadata_group))[0];
+	$self->{'buttonname'} = $self->generate_title_from_metadata($first_metadata_element);
+    }
 
     # Whether to group single items into a bookshelf (must be true for all metadata fields except the last)
@@ -123,5 +114,5 @@
     }
     if (!$self->{'always_bookshelf_last_level'}) {
-	# Default: leave leafnodes ungrouped (equivalent to AZCompactList -mingroup 2)
+	# Default: leave leaf nodes ungrouped (equivalent to AZCompactList -mingroup 2)
 	my $last_metadata_group = $metadata_groups[$#metadata_groups];
 	$self->{$last_metadata_group . ".always_bookshelf"} = "f";
@@ -136,13 +127,11 @@
     }
 
-    # How the items are grouped into partitions
-    if (!$partition_type_within_level) {
-	# Default: none
-	$partition_type_within_level = "none";
-    }
-    $self->{"partition_type_within_level"} = $partition_type_within_level;
+    # How the items are grouped into partitions (default: no partition)
+    if (!$self->{"partition_type_within_level"}) {
+	$self->{"partition_type_within_level"} = "none";
+    }
 
     # The number of items in each partition
-    if (!$partition_size_within_level) {
+    if (!$self->{'partition_size_within_level'}) {
 	# Default: 20
 	foreach my $metadata_group (@metadata_groups) {
@@ -151,5 +140,5 @@
     }
     else {
-	my @partition_size_within_levellist = split(/\//, $partition_size_within_level);
+	my @partition_size_within_levellist = split(/\//, $self->{'partition_size_within_level'});
 
 	# Assign values based on the partition_size_within_level parameter
@@ -165,10 +154,13 @@
     }
 
-    # The metadata elements to use to sort the leaf nodes
-    my @sort_leaf_nodes_usingmetadata_groups = ( "Title" );
-    if ($sort_leaf_nodes_using) {
-	@sort_leaf_nodes_usingmetadata_groups = split(/\|/, $sort_leaf_nodes_using);
-    }
-    $self->{'sort_leaf_nodes_usingmetadata_groups'} = \@sort_leaf_nodes_usingmetadata_groups;
+    # The metadata elements to use to sort the leaf nodes (default: Title)
+    my @sort_leaf_nodes_using_metadata_groups = ( "Title" );
+    if ($self->{'sort_leaf_nodes_using'}) {
+	@sort_leaf_nodes_using_metadata_groups = split(/\|/, $self->{'sort_leaf_nodes_using'});
+    }
+    $self->{'sort_leaf_nodes_using_metadata_groups'} = \@sort_leaf_nodes_using_metadata_groups;
+
+    # An empty array for the document OIDs
+    $self->{'OIDs'} = [];
 
     return bless $self, $class;
@@ -219,5 +211,5 @@
 	    # Create a hash for the metadata values of each metadata element we're interested in
 	    my %metagroupsdone = ();
-	    foreach my $metadata_group (@metadata_groups, @{$self->{'sort_leaf_nodes_usingmetadata_groups'}}) {
+	    foreach my $metadata_group (@metadata_groups, @{$self->{'sort_leaf_nodes_using_metadata_groups'}}) {
 		# Take care not to do a metadata group more than once
 		unless ($metagroupsdone{$metadata_group}) {
@@ -258,5 +250,5 @@
     my %classifier_node = ( 'thistype' => "Invisible",
 			    'childtype' => $childtype,
-			    'Title' => $self->{'title'},
+			    'Title' => $self->{'buttonname'},
 			    'contains' => [] );
 
@@ -467,5 +459,5 @@
 	    else {
 		# Sort the leaf nodes by the metadata elements specified with -sort_leaf_nodes_using
-		my @sort_leaf_nodes_usingmetadata_groups = @{$self->{'sort_leaf_nodes_usingmetadata_groups'}};
+		my @sort_leaf_nodes_usingmetadata_groups = @{$self->{'sort_leaf_nodes_using_metadata_groups'}};
 		foreach my $sort_leaf_nodes_usingmetaelem (reverse @sort_leaf_nodes_usingmetadata_groups) {
 		    my %OIDtometavaluehash = %{$self->{$sort_leaf_nodes_usingmetaelem . ".list"}};
