Stuff with the Perl Foundation. A couple of patches in the Perl core. A few CPAN modules. That about sums it up.
Since modules is taken, I was thinking about packages to do this:
#use Spreadsheet::ParseExcel::Workbook;
#use Spreadsheet::ParseExcel::Worksheet;
#use Spreadsheet::ParseExcel::Font;
#use Spreadsheet::ParseExcel::Format;
#use Spreadsheet::ParseExcel::Cell;
#use Spreadsheet::ParseExcel::FmtDefault;
use packages 'Spreadsheet::ParseExcel' => qw(
Workbook
Worksheet
Font
Format
Cell
FmtDefault
);
No idea if people would really care, but I like the cleaner syntax. Or maybe as a new feature with 'aliased':
use aliased 'Spreadsheet::ParseExcel', import => [qw(
Workbook
Worksheet
Font
Format
Cell
FmtDefault
)];
Seems an uncomfortable overloading of aliased, but it could be handy.
What about 'from' (Score:1)
What about
from?Or something else that looks more like English.
Shrug... (Score:2)
Personally I don't think it's really any cleaner. You've just hidden your meaning behind another statement, another module that the next maintainer has to go and read the docs for to figure out what it does. Sure it's a bit of extra typing, but you only do it once per file.
Thumbs down (Score:1)
I think it adds complexity and reduces clarity just to save a few characters.
Simpler syntax (Score:1)
Actually I kinda like it since I hate all repetitions/duplications and regard them as evil.
But it needs the simplest syntax possible to avoid burning extra brainpower. Somehow all the above examples don't cut it.
How about supporting Unix shell's feature? And how about the name
multiormany?use many 'A::{B,C}::{D,E}';Re: (Score:1)
use many 'A::B::*';. Having torequire '/somedir/*.pl'comes up from time to time for me, though quite rarely.Re: (Score:1)
Please see Incidental Redundancy [blogspot.com].
Sorry (Score:2)
The original code is instantly understandable and the intent clear. Now when someone reads your new packages code, they have to pause for a few seconds to figure out what it does and why. I'm not entirely sure that extra speed bump is worth it.
Hmm... (Score:1)
Would be:
restricted ability to search (Score:2)
The suggested kind of shorthand makes it really hard to do custom searches of your code base, such as for all the code that might happen to use a particular module. (There might be many modules named mumble::Font - when you separate Spreadshht::ParseExcel unto a separate line from Font you lose the ability to find that unique name using generic tools.
Wildcard? (Score:2)
What, too Java?
Re: (Score:2)
Something I had considered once but was quickly talked out of. Basically, even many Java people admit that this construct was a mistake. You're not being explicit about what you want and it's therefore unclear what you get. Hell on maintenance programmers.
Module::Find (Score:1)
Re: (Score:2)
Same problems as listed in this proposal [perl.org]. I think, given the comments, I won't do it. Other can if they want :)