* Philippe Bruhat (BooK) [EMAIL PROTECTED] [2007-10-09 01:55]:
What's wrong about this?
eval use My::Big::Namespace::$_;
for qw( This That Munger::Fast Munger::Precise );
die $@ if $@;
That a) you check $@ to see if `eval` succeeded b) you do this
only once after performing
# from A. Pagaltzis
# on Monday 08 October 2007 22:44:
* Eric Wilhelm [EMAIL PROTECTED] [2007-10-09 01:40]:
The brackets are clunky though, particularly with the qw()
inside them.
use relative Third = -import = qw(with some args);
You mean `-import =` is less clunky than `[]`, and sometimes
-Original Message-
From: Jonathan Rockway [mailto:[EMAIL PROTECTED]
Pearce, Martyn wrote:
It is? How so?
Don't top-post. It ruins the flow for people trying to reply to you.
Fair point, apologies. I blame outlook, which I use only under protest.
To answer your question, see
Eric Wilhelm wrote:
Anyway, this is an unchecked eval, and always-on.
# import the symbols from the loaded module into the caller module
eval qq{ package $caller; $module-import };
Indeed. Thanks for spotting this.
--
Sébastien Aperghis-Tramoni
Close the world, txEn eht nepO.
Pearce, Martyn wrote:
-Original Message-
From: Jonathan Rockway [mailto:[EMAIL PROTECTED]
Pearce, Martyn wrote:
It is? How so?
Don't top-post. It ruins the flow for people trying to reply to you.
Fair point, apologies. I blame outlook, which I use only
On 9 Oct 2007, at 11:05, Jonathan Rockway wrote:
What a fucking joke.
If it's a joke you should use Comic Sans so everyone /knows/ it's funny.
--
Andy Armstrong, Hexten
Andy Armstrong wrote:
On 9 Oct 2007, at 11:05, Jonathan Rockway wrote:
What a fucking joke.
If it's a joke you should use Comic Sans so everyone /knows/ it's funny.
No no, Comic Sans is for presentations to the shareholders!
Regards,
Jonathan Rockway
signature.asc
Description: OpenPGP
On 9 Oct 2007, at 11:19, Jonathan Rockway wrote:
Andy Armstrong wrote:
On 9 Oct 2007, at 11:05, Jonathan Rockway wrote:
What a fucking joke.
If it's a joke you should use Comic Sans so everyone /knows/ it's
funny.
No no, Comic Sans is for presentations to the shareholders!
Somebody
* Bill Ward [EMAIL PROTECTED] [2007-10-07 04:55]:
Would lib::relative be too weird?
There is already a `lib` pragma; `lib::relative` to me sounds
like “does something like `lib`, only relatively,” which more
naturally suggests something to do with relative paths and
[EMAIL PROTECTED]
I proposed
On Mon, Oct 08, 2007 at 01:51:21PM +0200, A. Pagaltzis wrote:
There is already a `lib` pragma; `lib::relative` to me sounds
like ???does something like `lib`, only relatively,??? which more
naturally suggests something to do with relative paths and
[EMAIL PROTECTED]
I proposed
A. Pagaltzis wrote:
* Bill Ward [EMAIL PROTECTED] [2007-10-07 04:55]:
Would lib::relative be too weird?
There is already a `lib` pragma; `lib::relative` to me sounds
like does something like `lib`, only relatively, which more
naturally suggests something to do with relative paths and
Pearce, Martyn wrote:
It is? How so?
Don't top-post. It ruins the flow for people trying to reply to you.
To answer your question, see http://use.perl.org/~Aristotle/journal/33995 .
FWIW, I (and thousands upon thousands of others) have used FindBin for
years without problems. However,
# from Sébastien Aperghis-Tramoni
# on Monday 08 October 2007 15:27:
Since the beginning, I had though that if I wanted to pass arguments
to the modules, I'd write it like this:
use relative qw(First Second), Third = [qw(with some args)]
because I usually load modules without passing
* Eric Wilhelm [EMAIL PROTECTED] [2007-10-09 01:40]:
The brackets are clunky though, particularly with the qw()
inside them.
use relative Third = -import = qw(with some args);
You mean `-import =` is less clunky than `[]`, and sometimes
having to write several `use relative` lines is less
On Oct 6, 2007, at 1:27 PM, Sébastien Aperghis-Tramoni wrote:
Paul Hoffman wrote:
use relative to = Enterprise::Framework = qw(Base Factory);
# loads Enterprise::Framework:Base,
Enterprise::Framework::Factory
Hmm, the last example is equivalent to this:
use relative qw(to
A. Pagaltzis wrote:
even with the current interface,
it’s possible to load a to.pm if you do it this way:
use relative to = __PACKAGE __, qw(to from before after boo);
But that’s a) noisy b) less than self-suggesting.
My I suggest this:
use relative to = self, qw(foo bar roo);
On 7 Oct 2007, at 21:48, Jim Schneider wrote:
use relative to = self, qw(foo bar roo);
Anything else would be used the way it is currently defined. I
like relative to = 'self', because it seems a bit more regular,
and somewhat self documenting.
I think that's the default. You only use
Hello Aristotle,
A. Pagaltzis wrote:
Hi Sébastien,
* Sébastien Aperghis-Tramoni [EMAIL PROTECTED] [2007-10-06 03:05]:
package BigApp::Report;
use relative to_parent = qw(Utils);
# loads BigApp::Utils
use relative to_self = qw(Create Publish);
# loads
On 6 Oct 2007, at 11:17, Sébastien Aperghis-Tramoni wrote:
I like the idea. Catalyst privately invents something like that,
so obviously there are other people who feel the same need.
Yes, POE also provide a similar mechanism, that's why I was
thinking to provide a generic module to do that.
Andy Armstrong wrote:
But I like neither the name nor the interface. How about this:
package BigApp::Report;
use subclass qw(..::Utils Create Publish);
# loads BigApp::Utils, BigApp::Report::Create,
BigApp::Report::Publish
subclass would imply more OO semantic than I'd like, as
On 6 Oct 2007, at 11:46, Sébastien Aperghis-Tramoni wrote:
Would it also do
use relative [to = 'My::Big::Namespace'] = qw( This That
Munger::Fast Munger::Precise );
It can easily do that. The problem is more the name. In this case,
use relative to ... works well. But in y original
Andy Armstrong wrote:
Would it also do
use relative [to = 'My::Big::Namespace'] = qw( This That
Munger::Fast Munger::Precise );
It can easily do that. The problem is more the name. In this case,
use relative to ... works well. But in y original example, use
subclass works better. Maybe
On 10/6/07, Andy Armstrong [EMAIL PROTECTED] wrote:
I always hesitate to suggest Aristotle is mistaken - it's not a
common occurrence - but I really think 'subclass' is wrong. As you
said this is an extension to the semantics of use that has (I
presume) nothing to do with any inheritance
On Oct 5, 2007, at 9:04 PM, Sébastien Aperghis-Tramoni wrote:
The interest of such a module would be to ease writing modules
using a big set of sibling modules (in the same hierarchy), and
would also simplify refactoring and renaming.
As of now the user still has to write the whole
* Sébastien Aperghis-Tramoni [EMAIL PROTECTED] [2007-10-06 20:30]:
As a side note, using find(1) on a mini-CPAN and Google
CodeSearch, I only found 3 modules named tp.pm:
Don’t forget the darkPAN though.
An acceptable compromise it to write it as C -to = Root
That’s what I’d suggest. FWIW,
# from A. Pagaltzis
# on Saturday 06 October 2007 13:44:
Then again, I’d called mine lib::relative. Maybe this one should
be pkg::relative?
That sounds good.
--Eric
--
We who cut mere stones must always be envisioning cathedrals.
--Quarry worker's creed
Ken Williams wrote:
If there were a return value from import(), they could do something
like this instead:
package BigApp::Report;
use relative;
my $Pub = import relative to_self = qw(Create Publish);
my $p = $Pub-new;
Except that, 1), the API has changed a
David Cantrell wrote:
Also agreeing for the API change. I know I was pondering about using
.. but can't remember why I didn't.
'..' is only meaningful in the Unix/Win32 world. VMS, RISC OS and
others call it something else. On the other hand, I think it's
safe to
assume that anyone using
A. Pagaltzis wrote:
* Sébastien Aperghis-Tramoni [EMAIL PROTECTED] [2007-10-06 20:30]:
As a side note, using find(1) on a mini-CPAN and Google
CodeSearch, I only found 3 modules named tp.pm:
Don’t forget the darkPAN though.
On a side note, if some people here know Perl modules outside CPAN
On 10/6/07, Andy Armstrong [EMAIL PROTECTED] wrote:
On 6 Oct 2007, at 11:46, Sébastien Aperghis-Tramoni wrote:
Would it also do
use relative [to = 'My::Big::Namespace'] = qw( This That
Munger::Fast Munger::Precise );
It can easily do that. The problem is more the name. In this case,
On 10/6/07, David Cantrell [EMAIL PROTECTED] wrote:
Sébastien Aperghis-Tramoni wrote:
Also agreeing for the API change. I know I was pondering about using
.. but can't remember why I didn't.
'..' is only meaningful in the Unix/Win32 world. VMS, RISC OS and
others call it something else.
Hi Sébastien,
* Sébastien Aperghis-Tramoni [EMAIL PROTECTED] [2007-10-06 03:05]:
package BigApp::Report;
use relative to_parent = qw(Utils);
# loads BigApp::Utils
use relative to_self = qw(Create Publish);
# loads BigApp::Report::Create,
32 matches
Mail list logo