[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
SF.net SVN: ledger-smb:[4055] branches/1.3/LedgerSMB/Template.pm
- Subject: SF.net SVN: ledger-smb:[4055] branches/1.3/LedgerSMB/Template.pm
- From: ..hidden..
- Date: Thu, 24 Nov 2011 19:13:56 +0000
Revision: 4055
http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=4055&view=rev
Author: tshvr
Date: 2011-11-24 19:13:55 +0000 (Thu, 24 Nov 2011)
Log Message:
-----------
delete tempfile
Modified Paths:
--------------
branches/1.3/LedgerSMB/Template.pm
Modified: branches/1.3/LedgerSMB/Template.pm
===================================================================
--- branches/1.3/LedgerSMB/Template.pm 2011-11-24 18:41:05 UTC (rev 4054)
+++ branches/1.3/LedgerSMB/Template.pm 2011-11-24 19:13:55 UTC (rev 4055)
@@ -140,6 +140,8 @@
use LedgerSMB::Company_Config;
use LedgerSMB::Locale;
+my $logger = Log::Log4perl->get_logger('LedgerSMB::Template');
+
sub new {
my $class = shift;
my $self = {};
@@ -278,9 +280,12 @@
$format->can('process')->($self, $cleanvars);
#return $format->can('postprocess')->($self);
my $post = $format->can('postprocess')->($self);
+ $logger->debug("\$format=$format \$self->{'noauto'}=$self->{'noauto'} \$self->{rendered}=$self->{rendered}");
if (!$self->{'noauto'}) {
# Clean up
+ $logger->debug("before self output");
$self->output(%$vars);
+ $logger->debug("after self output,but does not seem to return here!");
if ($self->{rendered}) {
unlink($self->{rendered}) or
throw Error::Simple 'Unable to delete output file';
@@ -331,6 +336,7 @@
while (my $line = <DATA>){
$data .= $line;
}
+ unlink($self->{rendered}) or throw Error::Simple 'Unable to delete output file';
}
my $format = "LedgerSMB::Template::$self->{format}";
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.