Finished changes for v0.21 - including documentation fixes and a new renderer
[p5sagit/Excel-Template.git] / lib / Excel / Template / TextObject.pm
index 6c7a99e..607eaff 100755 (executable)
@@ -19,7 +19,9 @@ sub new
     my $class = shift;
     my $self = $class->SUPER::new(@_);
 
-    $self->{STACK} = [] unless UNIVERSAL::isa($self->{STACK}, 'ARRAY');
+    $self->{STACK} = []
+        unless defined $self->{STACK} &&
+            UNIVERSAL::isa($self->{STACK}, 'ARRAY');
 
     return $self;
 }