http://qs321.pair.com?node_id=11117625


in reply to Re: Collapsing smaller scripts into a larger one, request for comment
in thread Collapsing smaller scripts into a larger one, request for comment

I looked at FindBin and can not tell what purpose it serves. It seems I would still need to know the relative path to my lib, so why add this to it?

And so you know, the __DATA__ I put in the original post was just first paragraphs. Some __DATA__ fields are hundreds of lines long. So the modules you are suggesting would be tidier with __DATA__ fields and exporting those fields as a glob (faux file handle). I am also not sure that use statements could be put into loops.

my $dir = '../files/lib/site/Collections'; opendir($dir) || die $!; my @modules = map { s/\.pm// } File::Spec->no_upwards(readdir($dir)); closedir($dir); for my $module (@modules) { use site::Collections::$module; }

However, I may be misunderstanding what you are suggesting. The text still needs extensive munging any way I do it.

My OS is Debian 10 (Buster); my perl versions are 5.28.1 local and 5.8.8 on web host.

Version control is a non-issue, I do not use it.

No matter how hysterical I get, my problems are not time sensitive. So, relax, have a cookie, and a very nice day!
Lady Aleena