No. You can wrap a whole package in a block:
{ package HTML::Strip; ... rest of HTML/Strip.pm goes here }
The two things you need to look out for is __END__ blocks or __DATA__ blocks in the modules, and "unclosed" POD sections. You need to close the POD sections and remove everything from __END__ or __DATA__ onwards because Perl stops reading the file at these locations too.
So if you have an example file HTML/Strip.pm
package HTML::Strip; sub pole_slide { ... }; 1; __END__ =head1 NAME HTML::Strip =cut
... you'd include the following in your main program:
package HTML::Strip; sub pole_slide { ... }; 1; package main; # use HTML::Strip; BEGIN { HTML::Strip->import() }; # rest of your main program goes here
This is a slightly different approach than what App::Fatpacker uses, and it requires a bit more human judgement, but it involves much less Perl internals and you'll learn a bit about how packages and modules interact.
In reply to Re^7: Trying to use App::Fatpacker
by Corion
in thread Trying to use App::Fatpacker
by elef
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |