perl-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stas Bekman <>
Subject Re: [mp2 bug fix] Placeholder modules
Date Fri, 31 Dec 2004 02:21:12 GMT
Adam Kennedy wrote:
> Other conversations aside, here's a fix for another issue you were having.
> Another thread earlier mentioned you were having problem getting the 
> indexer to see modules, and that you might need need to use placeholder 
> modules or something.
> This is indeed what you need to do. For very heavily C-based modules the 
> solution normally would look something like this. (from the Dynaloader 
> docs).
> package YourPackage;
> require DynaLoader;
> @ISA = qw(... DynaLoader ...);
> bootstrap YourPackage;
> __END__
> =pod
> =head1 NAME YourPackage;
> ... documentation for module goes here ...
> =cut
> What I imagine you will have to do is to make a set of what would 
> essentially be version/documentation module files, and have them all 
> call back to the main loader, which will do the right thing adding the 
> %INC entries in.

Nothing complex like that is needed, Adam. Please take a look at the 
existing code and you will see that those are already autogenerated and 
each package has a doc that is glued at install time.

A much simpler workaround is to autogenerate a single file which lists the 
package name and version for autogenerated packages. e.g.:
package Foo;
$VERSION = 0.01;
package Bar;
$VERSION = 0.01;

and include that in the distro. but that's yet another hack.

The really proper solution is to extend META.yml to include a new key: 
provides (not there yet: (CC'ing Randy W. Sims, 
the father of META.yml) which should provide an alternative way to specify 
which packages + version the distro provides (to handle the situation when 
the modules are autogenerated and don't physically exist in the source 

Of course it'll be as usual met with resistance from PAUSE keepers. And a 
yet another workaround will be suggested as the only acceptable solution :(

Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker     mod_perl Guide --->

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message