I just ran into a similar problem in POE::Driver::SysRW. For
portability I have a couple lines similar to
$! = 0 if $! == EAGAIN or $! == EWOULDBLOCK;
EAGAIN and EWOULDBLOCK are identical on most systems. In fact, one is
usually defined in terms of the other. They differ on a few
Rocco Caputo wrote:
On Sun, Jul 11, 2004 at 10:09:38PM +0200, James Mastros wrote:
All unreachable code is either people misusing the term unreachable, a
bug in Devel::Cover, or dead code that should be removed.
Here's a puzzle, then.
I just ran into a similar problem in POE::Driver::SysRW. For
On Sun, Jul 11, 2004 at 10:09:38PM +0200, James Mastros wrote:
All unreachable code is either people misusing the term unreachable, a
bug in Devel::Cover, or dead code that should be removed.
Here's a puzzle, then.
I just ran into a similar problem in POE::Driver::SysRW. For
portability I
On Jul 11, 2004, at 11:09 AM, Michael G Schwern wrote:
I document private code like this:
=begin private
put your normal POD here
=end private
perldoc won't show the POD but someone reading through the code (and
thus
needing to know about private functions) will see it. And POD is very
readable
Pete Krawczyk wrote:
Consider the following code:
$impclass ||= implementor($scheme) ||
do {
require URI::_foreign;
$impclass = 'URI::_foreign';
};
That's in URI.pm, lines 54-58.
Devel::Cover treats that as a conditional. So short of deleting
On Jul 11, 2004, at 4:09 PM, James Mastros wrote:
package Foo;
sub new {
my $class=shift;
$class=ref($class)||$class;
bless [], $class;
}
eval { Foo::new(); }
is($!, new dies when called as a function);
Actually this doesn't die, it does even worse, given this code:
package Foo;
sub new {
On Jul 9, 2004, at 6:06 PM, Andy Lester wrote:
Don't be mesmerized by 100% coverage.
Agreed 100% here. However, I stand by my original statement that you
CAN have 100% coverage on subroutines and pod. Any disagreement on
that
one?
I agree with having 100% on subroutines, and I would add that
On Sun, Jul 11, 2004 at 12:26:44PM -0400, stevan little wrote:
As for POD, in most cases, I agree with you, but to say you should have
100% POD coverage brings up several other questions, such as; Should I
document private methods?
IMPO yes, but Pod::Coverage (and thus Devel::Cover) will
Subject: Re: Phalanx: What if full coverage isn't possible? (fwd)
From: stevan little [EMAIL PROTECTED]
Date: Sun, 11 Jul 2004 12:26:44 -0400
}As for POD, in most cases, I agree with you, but to say you should have
}100% POD coverage brings up several other questions, such as; Should I
Micheal,
On Jul 11, 2004, at 2:09 PM, Michael G Schwern wrote:
On Sun, Jul 11, 2004 at 12:26:44PM -0400, stevan little wrote:
As for POD, in most cases, I agree with you, but to say you should
have
100% POD coverage brings up several other questions, such as; Should I
document private methods?
On Sun, Jul 11, 2004 at 12:26:44PM -0400, stevan little ([EMAIL PROTECTED]) wrote:
As for POD, in most cases, I agree with you, but to say you should have
100% POD coverage brings up several other questions, such as; Should I
document private methods? What about modules which are meant to be
On Sun, Jul 11, 2004 at 03:07:22PM -0400, stevan little ([EMAIL PROTECTED]) wrote:
I think that reg-ex is too loose (and incorrect, but I know you really
meant /^[A-Z]+$/). I would rather see it check for all the documented
magic methods rather than a catch all for UPPERCASE names. Even
Michael G Schwern wrote:
Test coverage is a useful *heuristic* for test effectiveness. Like all
heuristics if you push it too far it falls apart. Get as close to 100% as
is useful and don't worry about the rest.
Indeed. Brian Marick wrote a great paper on this topic - How to Misuse
Code
Consider the following code:
$impclass ||= implementor($scheme) ||
do {
require URI::_foreign;
$impclass = 'URI::_foreign';
};
That's in URI.pm, lines 54-58.
Devel::Cover treats that as a conditional. So short of deleting
URI::_foreign, that do BLOCK
There's a whole set of these sort of problems.
sub new {
my $proto = shift;
my $class = ref $proto || $proto;
In this case, we probably don't want that ANYWAY. That's what I did
when I was through Data::Page for Leon Brocard, and it's now at 100%
coverage, across the
On Fri, Jul 09, 2004 at 12:10:52PM -0500, Pete Krawczyk wrote:
Consider the following code:
$impclass ||= implementor($scheme) ||
do {
require URI::_foreign;
$impclass = 'URI::_foreign';
};
That's in URI.pm, lines 54-58.
Devel::Cover treats
* Pete Krawczyk [EMAIL PROTECTED] [2004-07-09T13:10:52]
Devel::Cover will always see that as a partial test, and never a full
test:
[ ... ]
Is that a bug, then? Or is it something else? And how should I notate
that, keeping in mind the goals of Phalanx, so that it's clearly visible
that
On Fri, Jul 09, 2004 at 05:06:09PM -0500, Andy Lester wrote:
There's a whole set of these sort of problems.
Looking through a coverage analysis I just ran, here's some more idioms
that trip up 100% coverage.
my $foo = $bar || '';
my $foo = $bar || 1;
$this ||
On Fri, Jul 09, 2004 at 06:31:09PM -0400, Michael G Schwern wrote:
Looking through a coverage analysis I just ran, here's some more idioms
that trip up 100% coverage.
my $foo = $bar || '';
my $foo = $bar || 1;
$this || return;
Basically anything of the $foo ||
On Fri, Jul 09, 2004 at 12:10:52PM -0500, Pete Krawczyk wrote:
Consider the following code:
$impclass ||= implementor($scheme) ||
do {
require URI::_foreign;
$impclass = 'URI::_foreign';
};
That's in URI.pm, lines 54-58.
Devel::Cover
On 7/9/2004 4:57 PM, Paul Johnson wrote:
On Fri, Jul 09, 2004 at 12:10:52PM -0500, Pete Krawczyk wrote:
Consider [code with unreachable path] Devel::Cover will always see that as
a partial test, and never a full test: Is that a bug, then?
That's for you to decide. The lack of coverage serves
21 matches
Mail list logo