in reply to Perl too smart require()ing libs

You can use pl2pm to convert your Perl4-style .pl library files to Perl5-style library modules.

Create Foo.pm and Bar.pm:

$ pl2pm foo.pl bar.pl
Rewrite ExampleClass.pm:
#ExampleClass.pm package ExampleClass; use lib '.'; use Bar; use Foo qw/can_i_see_you/; sub new { my $class = shift; bless {}, $class; } sub does_work { can_i_see_you(); } 1;
$ perl -w runme.pl You can see me!
--
print map{chr}unpack(q{A3}x24,q{074117115116032097110111116104101114032080101114108032104097099107101114})

Replies are listed 'Best First'.
Re^2: Perl too smart require()ing libs
by clscott (Friar) on Jun 22, 2007 at 15:54 UTC

    I attempted this just to see what the resulting pm would look like but pl2pm choked on the library.

    Thanks for the suggestion though.

    --
    Clayton