Steffen Winkler via RT wrote:
Show quoted text> missing
> -------
> use Module 123;
> use Module 123 @import_list;
>
> there is implemented only
> -------------------------
> use Module;
> use Module @import_list;
I think I understand what you're saying, but some UNIVERSAL::require code
illustrating the problem would help. Do you mean that $module->use() has no
way to do a version check? Yes, and the magic syntax is problematic.
How does one express "use Module 1.23 @import_list" as a method call?
use_with_version_check( $version, @imports )?
Incidentally, there is the magical Perl built-in version check which is "use
Module 123 @import_list" and then Exporter has it's own version check. That
makes "use Module 123, @import_list" work. For example...
$ perl -wle 'use UNIVERSAL::require; print Exporter->use( 999, qw(foo) );
print $UNIVERSAL::require::ERROR'
0
Exporter version 999 required--this is only version 5.58 at
/usr/local/perl/5.8.8/lib/Exporter/Heavy.pm line 121.
But the module must be an Exporter for this to work. Things which write their
own totally customized exports, like CGI, won't work.
--
Whip me, beat me, make my code compatible with VMS!