robertobouza has asked for the wisdom of the Perl Monks concerning the following question:
And this is the perl code:<HTML> <HEAD> <TITLE>Application auto-deployed</TITLE> </HEAD> <BODY> <h1>Application information</h1><br><br> <dl> <dt>Status</dt><dd>#deploymentStatus#</dd> <dt>Name</dt><dd>#applicationName#</dd> <dt>Tag</dt><dd>#applicationTag#</dd> <dt>Environment</dt><dd>#applicationEnvironment#</dd> <dt>Triggered by</dt><dd>#triggeredBy#</dd> <dt>Completion time</dt><dd>#timeToComplete#</dd> </dl> </BODY> </HTML>
Thanks for your wisdom.my $isOpen = open($handle, $templateLocation); if (!-e $templateLocation || !$isOpen) { my $exception = MidTier::Exception->new("2", "Error op +ening file for reading: $templateLocation", $self); close($handle); $exception->sendLog(); } else { $logger->debug("File $templateLocation opened"); } $logger->info("Building template: $template"); while(my $line = readline($handle)) { if (!$line || $!) { $logger->error("Error reading line from file: $!") +; } else { if ($line =~ s/#((:?\w|\d)+)#/$templateValuesHash{ +$1}/g) { $logger->debug("Replacing #$1# by $templateVal +uesHash{$1} on template"); } $compiledTemplate .= $line; } } return $compiledTemplate;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Error reading line from file: Operation timed out
by moritz (Cardinal) on May 13, 2009 at 17:13 UTC | |
|
Re: Error reading line from file: Operation timed out
by shmem (Chancellor) on May 13, 2009 at 21:10 UTC | |
|
Re: Error reading line from file: Operation timed out
by RoyCrowder (Monk) on May 13, 2009 at 17:50 UTC | |
by moritz (Cardinal) on May 13, 2009 at 18:20 UTC | |
by robertobouza (Initiate) on May 13, 2009 at 19:15 UTC | |
by RoyCrowder (Monk) on May 13, 2009 at 19:45 UTC | |
by moritz (Cardinal) on May 13, 2009 at 20:24 UTC | |
by RoyCrowder (Monk) on May 13, 2009 at 20:34 UTC | |
by robertobouza (Initiate) on May 13, 2009 at 20:10 UTC |