Re: Howto make 'require' fail ?

2005-09-25 Thread Michael G Schwern
On Sun, Sep 25, 2005 at 07:53:40PM -0400, Randy W. Sims wrote: > I haven't tried overriding yet, but your mention of a change in > internals reminds me of another approach I had tried without success. > The docs imply in its psuedo perl version of C that I might be > able to set $INC{'Foo.pm'} t

Re: Howto make 'require' fail ?

2005-09-25 Thread Randy W. Sims
Michael G Schwern wrote: On Sat, Sep 24, 2005 at 02:13:46PM -0400, Randy W. Sims wrote: Is there a way to make C or C fail without manipulating @INC or hiding the physical file? Or more generally, how do you test all branches of constructs like: if ( eval {require Foo} ) { useFoo(); } elsif

Re: Testing dual XS/Perl modules

2005-09-25 Thread Michael G Schwern
On Sun, Sep 25, 2005 at 06:00:04PM +0200, demerphq wrote: > Is there a proper way to test both parts of dual implementation modules? > > In a pinch i came up with > > use DynaLoader; > sub DynaLoader::bootstrap{1}; # Don't dynaload anything please. > > use Scalar::Util qw(refaddr); #pure

Re: Howto make 'require' fail ?

2005-09-25 Thread Michael G Schwern
On Sat, Sep 24, 2005 at 02:13:46PM -0400, Randy W. Sims wrote: > Is there a way to make C or C fail without manipulating > @INC or hiding the physical file? Or more generally, how do you test all > branches of constructs like: > > if ( eval {require Foo} ) { > useFoo(); > } elsif ( eval {requi

Re: Howto make 'require' fail ?

2005-09-25 Thread Ivan Tubert-Brohman
Randy W. Sims wrote: Is there a way to make C or C fail without manipulating @INC or hiding the physical file? Check out Devel::Hide. I've never used it, but it's supposed to do that. From the SYNOPSIS: use Devel::Hide qw(Module/ToHide.pm); require Module::ToHide; # fails use Devel::Hi

Re: Graphing Perl Packages, updated

2005-09-25 Thread Adam Kennedy
Michael G Schwern wrote: On Fri, Sep 23, 2005 at 05:38:32PM +0200, Tels wrote: If you have any ideas how to make this even more usefull, please speak now. I will have limited email reading/writing capabilities the next two weeks, but I *will* respond to all emails/critics/praises, even though i

Testing dual XS/Perl modules

2005-09-25 Thread demerphq
Is there a proper way to test both parts of dual implementation modules? In a pinch i came up with use DynaLoader; sub DynaLoader::bootstrap{1}; # Don't dynaload anything please. use Scalar::Util qw(refaddr); #pure perl implementation to disable an XS implementation of a module that used

Re: Howto make 'require' fail ?

2005-09-25 Thread Randy W. Sims
Michael Graham wrote: Ivan Tubert-Brohman <[EMAIL PROTECTED]> wrote: Randy W. Sims wrote: Is there a way to make C or C fail without manipulating @INC or hiding the physical file? Check out Devel::Hide. I've never used it, but it's supposed to do that. Another strategy is to take advant

Re: Howto make 'require' fail ?

2005-09-25 Thread Michael Graham
Ivan Tubert-Brohman <[EMAIL PROTECTED]> wrote: > Randy W. Sims wrote: > > Is there a way to make C or C fail without manipulating > > @INC or hiding the physical file? > > Check out Devel::Hide. I've never used it, but it's supposed to do that. Another strategy is to take advantage of the fact t

Re: Howto make 'require' fail ?

2005-09-25 Thread Ivan Tubert-Brohman
Randy W. Sims wrote: Is there a way to make C or C fail without manipulating @INC or hiding the physical file? Check out Devel::Hide. I've never used it, but it's supposed to do that. From the SYNOPSIS: use Devel::Hide qw(Module/ToHide.pm); require Module::ToHide; # fails use Devel::Hi

Re: New kwalitee test, has_changes

2005-09-25 Thread Adam Kennedy
Paul Johnson wrote: On Fri, Sep 23, 2005 at 12:06:43PM +0200, Thomas Klausner wrote: Hi! On Fri, Sep 23, 2005 at 12:54:42PM +1000, Adam Kennedy wrote: Collecting any sort of coverage data is a complete bitch. Let me just say right now that doing it across _all_ of CPAN is flat out impossib

Howto make 'require' fail ?

2005-09-25 Thread Randy W. Sims
Is there a way to make C or C fail without manipulating @INC or hiding the physical file? Or more generally, how do you test all branches of constructs like: if ( eval {require Foo} ) { useFoo(); } elsif ( eval {require Alternate} ) { useAlternate(); } else { fake_it(); } Thanks, Randy

Re: New kwalitee test, has_changes

2005-09-25 Thread Adam Kennedy
It's impossible. Quite. I believe the only way is for the author to do the Devel::Cover dance and forward the results. It also distributes the workload out to where it should be done. Since it's an optional step that has no direct bearing on the functionality of the module, it's a sign tha

RE: Graphing Perl Packages, updated

2005-09-25 Thread Jan Dubois
On Fri, 23 Sep 2005, Michael G Schwern wrote: > On Fri, Sep 23, 2005 at 07:33:04PM +0200, Tels wrote: > > Not yet. Good idea. The relevant code is in parse_file() in > > gen_graph - it gets as option one .pm file and then does something > > with it. > > > > The lopp for each file is in gather_data(