Home  |  Linux  | Mysql  | PHP  | XML
From:Steve Bertrand Date:Tue Jun 30 03:51:58 2009
Subject:Re: Rendering data structures using CGI::Application
Gurunandan R. Bhat wrote:
> How do you want the output to look? If you write in a sample output, I
> could help with the template to generate that output

I would be extremely delighted to even get the following rendered for
now, given the Data::Dumper output below. If I had a decent example,
then I'd be able to learn from it, and go from there:

--- output displayed as I'd see it in the browser---

Error messages:

quantity is undefined, zero or illegal
amount is undefined or illegal
payment is undefined or illegal

Stack trace:

sub => undef;
filename => tests/purchase.pl
line => 43
package => main

sub => ISP::Transac::create_transaction
filename => /usr/local/lib/perl5/site_perl/5.8.9/ISP/Transac.pm
line => 32
package => ISP::Transac

sub => ISP::Sanity::transaction_data
filename => /usr/local/lib/perl5/site_perl/5.8.9/ISP/Sanity.pm
line => 55
package => ISP::Sanity

--- end browser output ---

Here again is the actual data. $VAR1 is an array of the error messages,
and $VAR2 is an array, where each element is a hash which represents a
level in a stack trace.

$VAR1 = \[
'quantity is undefined, zero or illegal',
'amount is undefined or illegal',
'payment is undefined or illegal'
];
$VAR2 = \[
{
'sub' => undef,
'filename' => 'tests/purchase.pl',
'line' => 43,
'package' => 'main'
},
{
'sub' => 'ISP::Transac::create_transaction',
'filename' =>
'/usr/local/lib/perl5/site_perl/5.8.9/ISP/Transac.pm',
'line' => 32,
'package' => 'ISP::Transac'
},
{
'sub' => 'ISP::Sanity::transaction_data',
'filename' =>
'/usr/local/lib/perl5/site_perl/5.8.9/ISP/Sanity.pm',
'line' => 55,
'package' => 'ISP::Sanity'
}
];

Thank you!

Steve

Navigate in group perl.beginners at sever nntp.perl.org
Previous Next


Your recent visits
help on example from "mastering algorithm with perl" on binary search
Re: Manipulating the symbol table
script for shutdown remote machine
Traversing Hash printing two times
Re: Need help with Mail::Sender



  
© No Copyright
You are free to use Anything, but please consult your advocate before doing so as this website
also list content from other sources which may be copyrighted.
Site Maintained by Zareef Ahmed
Powered By PHP Consultants