r1892@llin: dpavlin | 2009-05-29 20:16:29 +0200
authorDobrica Pavlinusic <dpavlin@rot13.org>
Fri, 29 May 2009 18:16:32 +0000 (18:16 +0000)
committerDobrica Pavlinusic <dpavlin@rot13.org>
Fri, 29 May 2009 18:16:32 +0000 (18:16 +0000)
 create output path if it doesn't exist

git-svn-id: svn+ssh://mjesec/home/dpavlin/svn/webpac2/trunk@1203 07558da8-63fa-0310-ba24-9fe276d99e06

lib/WebPAC/Output/Excel.pm

index ce316e0..f5369b5 100644 (file)
@@ -14,6 +14,7 @@ worksheet
 line
 ));
 
+use WebPAC::Path;
 use Spreadsheet::WriteExcel;
 use File::Slurp;
 use Encode qw/decode/;
@@ -68,6 +69,8 @@ sub init {
                return 0;
        }
 
+       mk_base_path( $self->path );
+
        $self->workbook( Spreadsheet::WriteExcel->new( $self->path ) ) ||
                $log->logdie("can't open ", $self->path,": $!");