Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.
  • You might be able to use Module::Pluggable []
  • The so called import-on-demand feature of Java:


    is generally considered bad practice, good only at quick-and-dirty code. Tools like Eclipse help expand these evil statements into qualified imports after compiling and resolving the class names in the current source file.

    Some of the problems are mentioned at []

    • If you use a name that exists in more than one package, the Java compiler cannot determine which fully-qualified name to use. You need to spe
    • You know, I think you make a compelling argument. I'll have to consider this and I might just drop the idea.

      • It used to be pretty standard in Python to import the whole shebang as well (ie from foo import *) but that is frowned upon today as well. Mainly because of namespace pollution.

        You really should only call what you need and if you do somthing like Our::Code::*; You may be surprised by what you are importing (whether you did it intentionally or not).
  • For me, the beauty of 'aliased' lies mostly in its shortcutting of names. If I'd want to make an API to declare multiple of these in one, I would probably do...

    use aliased::all 'Foo::Bar' => qw( Baz Quux Fnord );

    my $baz   = Baz->new;
    my $quux  = Quux->new;
    my $fnord = Fnord->new;

    With this, it is IMO short enough, explicit enough, and contains no surprises.

    Ordinary morality is for ordinary people. -- Aleister Crowley
  • ... after you've been working on your business code long enough, you know what's in lib/Our/Code/*.

    Java's an unreadable language because novices can't look at that program and instantly know where exactly every import came from. (Hey, this argument is fun to make!)