11 Aug 20:05
12 Aug 12:23
Re: broken tests?
Bridget Almas wrote: > A good percentage of the tests in Petal 2.13 (also occurred with at > least 2.05) are dumping core for me. I’m running using Perl 5.8.0 on a > Sun Ultra, release 5.8. (Attached is output of make, make test). > > Has anyone experienced a similar problem? > It all passes for me... I'm running Perl 5.8.3 on a fedora core 2 system. Could you run one of the failing test i.e. perl t/020_Comments.t and send the output to the list? Maybe it'll give us some insights. Cheers, Jean-Michel.
12 Aug 12:20
Re: broken tests?
Bridget Almas wrote: > A good percentage of the tests in Petal 2.13 (also occurred with at > least 2.05) are dumping core for me. I’m running using Perl 5.8.0 on a > Sun Ultra, release 5.8. (Attached is output of make, make test). > > Has anyone experienced a similar problem? > It all passes for me... I'm running Perl 5.8.3 on a fedora core 2 system. Could you run one of the failing test i.e. perl t/020_Comments.t and send the output to the list? Maybe it'll give us some insights. Cheers, Jean-Michel.
12 Aug 12:55
RE: broken tests?
The only output is "Segmentation Fault(coredump)". Do you want to see the core file? On test 031_Escape_Semicolon.t, it was the first unlike() test that was resulting in the core dump. I haven't narrowed it down further than that. -----Original Message----- From: Jean-Michel Hiver [mailto:jhiver@...] Sent: Thursday, August 12, 2004 6:21 AM To: Bridget Almas Cc: petal@... Subject: Re: [Petal] broken tests? Bridget Almas wrote: > A good percentage of the tests in Petal 2.13 (also occurred with at > least 2.05) are dumping core for me. I'm running using Perl 5.8.0 on a > Sun Ultra, release 5.8. (Attached is output of make, make test). > > Has anyone experienced a similar problem? > It all passes for me... I'm running Perl 5.8.3 on a fedora core 2 system. Could you run one of the failing test i.e. perl t/020_Comments.t and send the output to the list? Maybe it'll give us some insights. Cheers, Jean-Michel.
12 Aug 13:25
Re: broken tests?
Bridget Almas wrote: > The only output is "Segmentation Fault(coredump)". Do you want to see the > core file? I have no idea how those beasts work... > On test 031_Escape_Semicolon.t, it was the first unlike() test > that was resulting in the core dump. I haven't narrowed it down further than > that. OK... have you tried to just execute the test without any Petal stuff in it? Just to see wether the problem is in Petal or Test::More... If it's a problem with Test::More then Petal will /probably/ just work fine. Is another version of Petal (i.e. 2.12) working OK? If so we need to do a diff to see what changed... what's the most recent version of Petal which passes all the tests OK? I'm sorry the tests don't pass straight "out of the box". Petal is completely pure perl though, I don't see why it should core dump since I'm not doing too many crazy things. I'm not even fiddling around too much with the symbol table...
12 Aug 14:46
RE: broken tests?
As far as I can tell, the Petal installation works just fine (I'm not exercising it too heavily though). If I comment out the "use Test::More" and the like/unlike tests, the Petal test code also seems to work fine, so the problem must be in the test libraries. I am using the latest version of Test::Simple (0.47) and Test::Harness (2.42). Thanks, Bridget -----Original Message----- From: Jean-Michel Hiver [mailto:jhiver@...] Sent: Thursday, August 12, 2004 7:25 AM To: Bridget Almas Cc: petal@... Subject: Re: [Petal] broken tests? Bridget Almas wrote: > The only output is "Segmentation Fault(coredump)". Do you want to see the > core file? I have no idea how those beasts work... > On test 031_Escape_Semicolon.t, it was the first unlike() test > that was resulting in the core dump. I haven't narrowed it down further than > that. OK... have you tried to just execute the test without any Petal stuff in it? Just to see wether the problem is in Petal or Test::More... If it's a problem with Test::More then Petal will /probably/ just work fine. Is another version of Petal (i.e. 2.12) working OK? If so we need to do a diff to see what changed... what's the most recent version of Petal which passes all the tests OK? I'm sorry the tests don't pass straight "out of the box". Petal is completely pure perl though, I don't see why it should core dump since I'm not doing too many crazy things. I'm not even fiddling around too much with the symbol table...
12 Aug 15:00
Re: broken tests?
On Thu, Aug 12, 2004 at 06:46:23AM -0600, Bridget Almas wrote:
> As far as I can tell, the Petal installation works just fine (I'm not
> exercising it too heavily though). If I comment out the "use Test::More" and
> the like/unlike tests, the Petal test code also seems to work fine, so the
> problem must be in the test libraries. I am using the latest version of
> Test::Simple (0.47) and Test::Harness (2.42).
Does your perl have thread support enabled? Try
perl -V
and see if THREAD or USE_ITHREAD is mentioned in Compile-time options.
Test-Builder (used by Test-More) calls some thread functions to make it
thread safe however I think 5.8.0 might not be the best thread-wise.
To see if this is the problem, you could change the bit at the start of
Test/Builder.pm. My one looks something like
BEGIN {
use Config;
if( $] >= 5.008 && $Config{useithreads} ) {
require threads;
require threads::shared;
threads::shared->import;
}
else {
*share = sub { 0 };
*lock = sub { 0 };
}
}
changing
if( $] >= 5.008 && $Config{useithreads} ) {
to
if( 0 && $] >= 5.008 && $Config{useithreads} ) {
will turn off the thread stuff. If it works after that then you've found the
culprit.
Is there some particular reason you're using 5.8.0? The later versions fix a
lot of bugs and have tried to keep backwards compatibility,
F
12 Aug 15:05
Re: broken tests?
Bridget Almas wrote: >As far as I can tell, the Petal installation works just fine (I'm not >exercising it too heavily though). If I comment out the "use Test::More" and >the like/unlike tests, the Petal test code also seems to work fine, so the >problem must be in the test libraries. > Well, that's still a drag because you can't make sure that Petal is all working OK which is bad if you're running it on a production server... It would be good if you could come up with a simple non-petal dependent test which would demonstrate the behavior and send it to the maintainer of Test::More. Let us know how it goesCheers, Jean-Michel.
12 Aug 15:17
RE: broken tests?
It's not threads. From perl -V: usethreads=undef use5005threads=undef useithreads=undef As far as why I'm using Perl 5.8.0 ... too difficult to push through an upgrade of perl in our Production environment right now. If I get time, I'll try to isolate the problem with Test::More. Thanks for the help, Bridget -----Original Message----- From: Fergal Daly [mailto:fergal@...] Sent: Thursday, August 12, 2004 9:00 AM To: Bridget Almas Cc: Jean-Michel Hiver; petal@... Subject: Re: [Petal] broken tests? On Thu, Aug 12, 2004 at 06:46:23AM -0600, Bridget Almas wrote: > As far as I can tell, the Petal installation works just fine (I'm not > exercising it too heavily though). If I comment out the "use Test::More" and > the like/unlike tests, the Petal test code also seems to work fine, so the > problem must be in the test libraries. I am using the latest version of > Test::Simple (0.47) and Test::Harness (2.42). Does your perl have thread support enabled? Try perl -V and see if THREAD or USE_ITHREAD is mentioned in Compile-time options. Test-Builder (used by Test-More) calls some thread functions to make it thread safe however I think 5.8.0 might not be the best thread-wise. To see if this is the problem, you could change the bit at the start of Test/Builder.pm. My one looks something like BEGIN { use Config; if( $] >= 5.008 && $Config{useithreads} ) { require threads; require threads::shared; threads::shared->import; } else { *share = sub { 0 }; *lock = sub { 0 }; } } changing if( $] >= 5.008 && $Config{useithreads} ) { to if( 0 && $] >= 5.008 && $Config{useithreads} ) { will turn off the thread stuff. If it works after that then you've found the culprit. Is there some particular reason you're using 5.8.0? The later versions fix a lot of bugs and have tried to keep backwards compatibility, F
16 Aug 05:59
Modifiers and variables
Hey Jean-Michel et al,
I'm working on adding several new modifiers to Petal::Utils and have
come across an interesting proposal which I wanted to float with the
list.
When processing arguments passed to a modifier, there is not yet a
standard way of reading these values (at least to my knowledge). Warren
S. submitted a couple of modifiers which included a subroutine that he
devised which fetches the arguments in the following way:
1 - if the argument is a number (decimals are OK) or contains single
quotes, return the argument itself (i.e., plaintext)
2 - otherwise use the argument as the key to the hash and return that
value
I like this as it makes it really easy to pass in plain text without
having to use the string: modifier. However, I'm not sure whether this
is considered TAL compliant. What are your thoughts? I've included the
subroutine at the end.
Thanks,
William
sub _fetch {
my ($hash, $a) = @_;
return undef unless defined($a);
if($a =~ /\'/) {
$a =~ s/\'//g;
return $a;
}
elsif($a =~ /^[0-9.]+$/) {
return $a;
}
else {
return $hash->fetch($a);
}
}
--
--
Knowmad Services Inc.
http://www.knowmad.com
Cheers,
Jean-Michel.
RSS Feed