Missing modules unnoticed

34 views
Skip to first unread message

sciurius

unread,
Mar 3, 2011, 10:20:44 AM3/3/11
to Cava Packager
When a source refers to a module that cannot be found, no diagnostic
is produced.
I'd expect an error message, or at least a warning.
Is this intentional?

Cava Support

unread,
Mar 3, 2011, 1:25:09 PM3/3/11
to cava-p...@googlegroups.com
Hi,

Yes it is intentional. The text scan of modules in Cava is quite
simplistic. It currently produces a lot of 'false positives'. Which is
fine. The primary goal is to produce a working package. So having Cava
look for the largest set of modules and ignore apparently missing items
has functionally worked well for Cava on Windows for a number of years.

A basic design principle of Cava is a simple inclusive text scan with a
rich user interface that allows customisation. It has never been a
design goal to make the text scan the last word in smartness. Just that
it should not miss required modules that are present in @INC.

It would be nice to have a smaller but more accurate set of modules
required, and then warn for missing modules. But until I'm happy that
the results would be accurate, then warnings would just be noise.

For example, I don't think there is a generic way to determine in a text
scan that;

use base qw( Wx::Frame );

doesn't mean that a CPAN module Wx::Frame is missing. I can think of
many ways to determine it beyond the current text scan (including a
better text scan) , but for now a text scan is all that Cava does.

In my experience over the past few years with Cava on Windows, the only
occasion when Cava will not find a genuinely required module that it has
recognised as required is if the user has not added some library path
that exists in their normal setup ( PERL5LIB etc ). In this case the
resulting executable is normally totally none functional and the fix
clear to most users (or at least the need for a fix). The one exception
to this is where scripts and modules are in '.' in the runtime @INC
which Cava does not automatically add to the scan search paths. This has
confused some users in the past - I should make a point of it in the
documentation.

To be honest, whenever I consider this issue and I compare the level of
effort and testing required to produce an accurate 'this module is
missing and you need it' report, there always seems to be any number of
more important enhancements that ought to take priority over it.

I may implement a scheme whereby the user can download a CPAN index
periodically and the scan will check if an apparently required but
missing module is indexed on CPAN - and report that as missing. I'd have
to test practically the kind of output produced by this though.

Hope this explains why there are no 'missing' warnings and why it isn't
a high priority enhancement.

Regards

Mark

sciurius

unread,
Mar 3, 2011, 1:44:39 PM3/3/11
to Cava Packager
Yes, this explains why and I can totally agree that there are other
things more important.

Thanks for your time.

sciurius

unread,
May 18, 2013, 6:29:14 PM5/18/13
to cava-p...@googlegroups.com
OTOH, If a module is explicitly named with "Force Include Modules" and it cannot be found, I think this deserves a fatal error.
Reply all
Reply to author
Forward
0 new messages