[Petal] A structure bug
William McKee
william@knowmad.com
Fri, 4 Oct 2002 23:25:12 -0400
--Message-Boundary-29133
Content-type: text/plain; charset=US-ASCII
Content-transfer-encoding: 7BIT
Content-description: Mail message body
Hi Jean-Michel,
Well, it appears that there is a problem with the structure modifer in the
recent releases of Petal. I was using it successfully with 0.72 but now
it's no longer working. I have included the usual test files with this
email.
BTW, I looked in the tests folder to see if I could find an existing test
to see about debugging it. I couldn't find a test for the structure
modifier. I wish I had the time and ability to better understand your code
and give you patches instead of reports. It's a level or two above my
present skills, though <g>.
Thanks,
William
--
Lead Developer
Knowmad Services Inc. || Internet Applications & Database Integration
http://www.knowmad.com
--Message-Boundary-29133
Content-type: text/plain; charset=US-ASCII
Content-disposition: inline
Content-description: Attachment information.
The following section of this message contains a file attachment
prepared for transmission using the Internet MIME message format.
If you are using Pegasus Mail, or any another MIME-compliant system,
you should be able to save it or view it from within your mailer.
If you cannot, please ask your system administrator for assistance.
---- File information -----------
File: test.tmpl
Date: 4 Oct 2002, 23:35
Size: 6951 bytes.
Type: Unknown
--Message-Boundary-29133
Content-type: Application/Octet-stream; name="test.tmpl"; type=Unknown
Content-disposition: attachment; filename="test.tmpl"
Content-transfer-encoding: BASE64
PCEtLT8NCiMgICAgIFRlbXBsYXRlOiB0ZXN0LnRtcGwNCiMgICAgICBDcmVhdGVkOiAwNy0y
My0yMDAyDQojICAgICBNb2RpZmllZDogMTAtMDQtMjAwMg0KIyAgICAgICBBdXRob3I6IHds
bQ0KIyAgRGVzY3JpcHRpb246IFRlbXBsYXRlIHRvIGRvIHRlcnJpYmxlIHRoaW5ncyB0byB0
ZXN0IFBldGFsIHRlbXBsYXRlIGxhbmd1YWdlLg0KLS0+DQoNCjxodG1sPg0KCTxoZWFkPg0K
CQk8dGl0bGU+UGV0YWwgU3RyZXNzIFRlc3QgVGVtcGxhdGU8L3RpdGxlPg0KCTwvaGVhZD4N
Cgk8IS0tPyA8P3BldGFsOmluY2x1ZGUgZmlsZT0iaW5jbHVk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RtcGwiPz4NCg0KCQkJPGhyIHNpemU9IjUiIHdpZHRoPSI3NSUiPg0KDQoJCQk8cD5DcmVh
dGluZyBhIGxpbms8L3A+DQoJCQk8dWwgcGV0YWw6cmVwZWF0PSJzdHVkZW50IHN0dWRlbnRz
Ij4NCgkJCQk8bGk+PGEgaHJlZj0iIj48P3BldGFsOnZhciBuYW1lPSJlbmNvZGU6IHN0dWRl
bnQuZmlyc3RfbmFtZSI/PiA8P3BldGFsOnZhciBuYW1lPSJlbmNvZGU6IHN0dWRlbnQubGFz
dF9uYW1lIj8+IC0gPD9wZXRhbDp2YXIgbmFtZT0iZW5jb2RlOiBzdHVkZW50LmVtYWlsIj8+
PC9hPjwvbGk+DQoJCQk8L3VsPg0KDQoJCQk8aHIgc2l6ZT0iNSIgd2lkdGg9Ijc1JSI+DQoJ
CQk8P3BldGFsOmVuZD8+DQoNCgkJCTwhLS0/DQoJCQk8aDM+RW5kIFRlc3RzPC9oMz4NCg0K
CQkJPD9wZXRhbDppbmNsdWRlIGZpbGU9ImluY2x1ZGVzL2Zvb3Rlci50bXBsIiB0YWludD0i
MSI/Pg0KDQoJCQktLT4NCgkJPC9ib2R5Pg0KCTwvaHRtbD4NCg0K
--Message-Boundary-29133
Content-type: text/plain; charset=US-ASCII
Content-transfer-encoding: 7BIT
Content-description: Text from file 'test.cgi'
#!/usr/bin/perl
#
use strict;
use Petal;
use CGI::Carp qw/fatalsToBrowser/;
use constant RUNALLTESTS => 1;
# Extend the list of modifiers
$Petal::Hash::MODIFIERS->{pg_true} = 'Petal::Hash::Postgres::TRUE';
$Petal::Hash::MODIFIERS->{pg_false} = 'Petal::Hash::Postgres::FALSE';
$ENV{PATH} = "/bin:/usr/bin";
my $template_file = 'test.tmpl';
$Petal::DISK_CACHE = 0;
$Petal::MEMORY_CACHE = 0;
$Petal::TAINT = 1;
$Petal::BASE_DIR = './';
$Petal::INPUT = "HTML";
#$Petal::INPUT = "XML";
$Petal::OUTPUT = "XHTML";
#$Petal::OUTPUT = "XML";
my $template = new Petal ($template_file);
my $hash = {
petal => { version => $Petal::VERSION },
alltests => RUNALLTESTS,
error_message => "Kilroy was Here",
first_name => "William",
last_name => "McKee",
email => 'william@knowmad.com',
boolean => '1',
pg_boolean => 't',
pg_boolean_false => 'f',
students => [ { student_id => '1',
first_name => 'William',
last_name => 'McKee',
email => 'william@knowmad.com',
},
{ student_id => '2',
first_name => 'Elizabeth',
last_name => 'McKee',
email => 'elizabeth@knowmad.com',
},
],
html_string => '<h1 align="center">Header1 Centered</h1>',
};
my $html = $template->process($hash);
print "Content-type: text/html\n\n";
print $html;
--Message-Boundary-29133--