in a separate file.
I have 5-10 line modules that if I put in a separate file will multiple my work by 100%...
You don't split things to a separate file till at least 1000 in many cases, and I've seen manageable files in the 2-3k range, though 5k gets a bit unwieldy....
I have programs with 10 modules in 300 lines, and I should break them into 30 line modules each just because perl is broken?
So far every method that everyone "knows" works, doesn't in 5.14, and that one guy wants to claim 5.14 isn't broken (worse than 5.12 and 5.12 -- which were also broken in various ways)...
It's not like I haven't reported multiple bugs/RFE's...Usually met with resistance about not wanting to change the established order for fear of breaking existing code -- but I've got code broken by every perl upgrade since 5.6. Before that -- virtually nada (at least in the 5.x series).
I've been told on the perl-porters list that they way I am doing things should work just fine with import and such...
yet no one here seems to be able to make it work either.
Hopefully grandfather who's on that list will take note.
If I have to break it into separate files, then the language is broken.
packages are meant to be modular. They aren't. I complained and was told all I needed to do was use import.
I keep running into new problems in each new vversion.
(I have had some programs that worked in 5.12, but fail now in 5.14)...
So I wanted to make sure I wasn't missing *some* solution, that would work - before I go and file another bug about .. well... not sure!...
modules don't work?
I wanted 'use module' not try to include a module if it was in the same file... I got thoroughly roasted for that idea... yet it is so simple, but my guess is they can't make it work.
If it worked that way, then a package could be removed anytime, and it would work in a libdir the same as in program.
But now...it doesn't even work at all.
Sorry. Breaking apart a 800 line perl prog that was a 185 line shell script , into a 10-15 file perl monster is messed up.
These are not standalone packages -- they are mutually dependent classes. You don't put such things with dependent functionality in multiple files or your development becomes a nightmare finding what file you are supposed to be in.
In reply to Re^6: can't import using exporter
by perl-diddler
in thread can't import using exporter
by perl-diddler
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |