Index: /trunk/PS-IPP-Metadata-Config/Changes
===================================================================
--- /trunk/PS-IPP-Metadata-Config/Changes	(revision 9494)
+++ /trunk/PS-IPP-Metadata-Config/Changes	(revision 9495)
@@ -1,3 +1,6 @@
 Revision history for Perl module PS::IPP::Metadata::Config
+
+0.08
+    - add support for empty METADATAs
 
 0.07 Tue Oct 10 17:09:28 HST 2006
Index: /trunk/PS-IPP-Metadata-Config/config_grammar.txt
===================================================================
--- /trunk/PS-IPP-Metadata-Config/config_grammar.txt	(revision 9494)
+++ /trunk/PS-IPP-Metadata-Config/config_grammar.txt	(revision 9495)
@@ -1,5 +1,5 @@
 # Copyright (c) 2005  Joshua Hoblitt
 #
-# $Id: config_grammar.txt,v 1.5 2006-10-11 03:08:36 jhoblitt Exp $
+# $Id: config_grammar.txt,v 1.6 2006-10-12 02:08:51 jhoblitt Exp $
 
 {
@@ -87,5 +87,5 @@
 
 metadata:
-    metadata_name <commit> 
+    metadata_name 
     { push @scope_stack, $thisparser->{local}; $thisparser->{local} = {} }
     grammar
@@ -103,4 +103,19 @@
                 $return = undef;
             }
+
+            if ( defined $thisparser->{local}{name}{ $item{metadata_name} } ) {
+                $return->{multi}++
+                    if $thisparser->{local}{name}{ $item{metadata_name} } =~ /MULTI/;
+            } else {
+                $thisparser->{local}{name}{ $item{metadata_name} }++;
+            }
+        } 
+    | metadata_name <commit> comment_line(s?) metadata_end
+        {
+            $return = {
+                class   => 'metadata',
+                name    => $item{metadata_name},
+                value   => [],
+            };
 
             if ( defined $thisparser->{local}{name}{ $item{metadata_name} } ) {
Index: /trunk/PS-IPP-Metadata-Config/t/03_metadata.t
===================================================================
--- /trunk/PS-IPP-Metadata-Config/t/03_metadata.t	(revision 9494)
+++ /trunk/PS-IPP-Metadata-Config/t/03_metadata.t	(revision 9495)
@@ -3,5 +3,5 @@
 # Copyright (C) 2005  Joshua Hoblitt
 #
-# $Id: 03_metadata.t,v 1.3 2005-05-04 22:05:24 jhoblitt Exp $
+# $Id: 03_metadata.t,v 1.4 2006-10-12 02:08:51 jhoblitt Exp $
 
 use strict;
@@ -12,5 +12,5 @@
 #$::RD_TRACE = 1;
 
-use Test::More tests => 7;
+use Test::More tests => 9;
 use PS::IPP::Metadata::Config;
 
@@ -177,2 +177,22 @@
     ok( defined( $config ), "two metadata at the same depth");
 }
+
+{
+my $example = q{
+foo METADATA
+END
+};
+    my $config = PS::IPP::Metadata::Config->new->parse( $example );
+
+    ok( defined( $config ), "empty METADATA");
+
+    my $tree = [
+        {
+            name    => 'foo',
+            class   => 'metadata',
+            value   => [],
+        },
+    ];
+
+    is_deeply( $config, $tree, "empty METADATA structure");
+}
