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 is never going to return false.

Devel::Cover will always see that as a partial test, and never a full 
test:
http://www.petekrawczyk.com/perl/URI-orig/blib-lib-URI-pm--condition.html#L57

I don't like that code anyway, since it basically boils down to
        $impclass = $impclass = 'URI::_foreign';
assuming $impclass and $scheme aren't set.

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 no test of that condition's failure can truly take place in a regular
"make test" run?

-Pete K
-- 
Pete Krawczyk
  perl at bsod dot net


Reply via email to