Finished changes for v0.21 - including documentation fixes and a new renderer
[p5sagit/Excel-Template.git] / lib / Excel / Template / Container.pm
index 51ed783..df966d9 100644 (file)
@@ -17,7 +17,9 @@ sub new
     my $class = shift;
     my $self = $class->SUPER::new(@_);
 
-    $self->{ELEMENTS} = [] unless UNIVERSAL::isa($self->{ELEMENTS}, 'ARRAY');
+    $self->{ELEMENTS} = []
+        unless exists $self->{ELEMENTS} &&
+            UNIVERSAL::isa($self->{ELEMENTS}, 'ARRAY');
 
     return $self;
 }