in reply to How to split long "use Foo::Bar" lines?

Yes, no , not really, kind of.
`perldoc -f use'
`perldoc -f require'
use File'Spec'Win32; # shorten it like so BEGIN { require join '/', qw[ Foo Bar Baz Really Long Module Name.pm ]; }
You could turn that into a module used like
use m 'Foo::Bar::Baz' . 'Really::Long::Module::Name';
but that seems just dumb to me. Of course, cpan never disappoints (:
Module::Load
Module::Require

update: Here's a better idea, have the magazine use line numbers
1: use strict;
2: ###<--- max column width --->###
3: use Foo::Bar::Baz::Really::Long+
::Module::Name;
4: use CGI;
...

update: thanks ysth, yes, I mean't Name.pm (typo fixed).

MJD says "you can't just make shit up and expect the computer to know what you mean, retardo!"
I run a Win32 PPM repository for perl 5.6.x and 5.8.x -- I take requests (README).
** The third rule of perl club is a statement of fact: pod is sexy.

Replies are listed 'Best First'.
Re: Re: How to split long "use Foo::Bar" lines?
by ysth (Canon) on May 25, 2004 at 07:56 UTC
    I think you mean Name.pm, not Name in that qw[].

    Adapting the 'use m' idea, from 5.6.2 onward, you could say:

    ###<--- max column width --->### use if 1, "Foo::Bar::Baz::". "Really::Long::". "Module::Name";
Re: Re: How to split long "use Foo::Bar" lines?
by hardburn (Abbot) on May 24, 2004 at 16:00 UTC

    Isn't the Ada-like package seperator deprecated? Even if not, I still think it's ugly. It tends to confuse syntax-highlighting editors, too.

    ----
    send money to your kernel via the boot loader.. This and more wisdom available from Markov Hardburn.