[EMAIL PROTECTED] (Aaron Sherman) writes:
> > my $x = Some::Module::That::Defines::A::Class.AUTOLOAD.new("blah");
>
> Wow, that's pretty amazing... uh... I think I'd just prefer to do it
> the old fashioned way. If my suggestion was really that horrific, I
> withdraw the question.
These days, to
Dave Whipp wrote:
"Sean O'Rourke" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
my $x = (use Some::Module::That::Defines::A::Class).new("blah");
how about some variation on
my $x = Some::Module::That::Defines::A::Class.AUTOLOAD.new("blah");
Wow, that's pretty amazing...
"Sean O'Rourke" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> my $x = (use Some::Module::That::Defines::A::Class).new("blah");
how about some variation on
my $x = Some::Module::That::Defines::A::Class.AUTOLOAD.new("blah");
Dave.
At Mon, 23 Aug 2004 15:51:00 -0400,
[EMAIL PROTECTED] (Aaron Sherman) wrote:
>
> On Mon, 2004-08-23 at 15:19, Paul Seamons wrote:
> > > So, I was wondering about a synonym, like:
> > >
> > > uses Some::Module::That::Defines::A::Class $foo;
> >
> > Well if the long name is the problem:
> >
> >
Hello,
Aaron Sherman wrote:
> I was thinking about the case where you use a module, only to define a
> class that you then instantiate like this:
[ snip ]
> So, I was wondering about a synonym, like:
>
> uses Some::Module::That::Defines::A::Class $foo;
is $foo implicitely declared as our or my (
Aaron Sherman wrote:
I was thinking about the case where you use a module, only to define a
class that you then instantiate like this:
use Some::Module::That::Defines::A::Class;
our Some::Module::That::Defines::A::Class $foo := new;
and I keep thinking that that's too redundant. It'
On Mon, Aug 23, 2004 at 12:53:04PM -0400, Aaron Sherman wrote:
> I was thinking about the case where you use a module, only to define a
> class that you then instantiate like this:
>
> use Some::Module::That::Defines::A::Class;
> our Some::Module::That::Defines::A::Class $foo := new;
>
On Mon, 2004-08-23 at 15:19, Paul Seamons wrote:
> > So, I was wondering about a synonym, like:
> >
> > uses Some::Module::That::Defines::A::Class $foo;
>
> Well if the long name is the problem:
>
> use Some::Module::That::Defines::A::Class as Foo;
No, like I said: this is not golf. I'm tryi
> So, I was wondering about a synonym, like:
>
> uses Some::Module::That::Defines::A::Class $foo;
Well if the long name is the problem:
use Some::Module::That::Defines::A::Class as Foo;
my Foo $obj .= new;
# OR #
require Some::Module::That::Defines::A::Class;
import Some::Module::That::D
Aaron Sherman skribis 2004-08-23 12:53 (-0400):
> use Some::Module::That::Defines::A::Class;
> our Some::Module::That::Defines::A::Class $foo := new;
> and I keep thinking that that's too redundant
> (...)
> So, I was wondering about a synonym, like:
> uses Some::Module::That::Def
I was thinking about the case where you use a module, only to define a
class that you then instantiate like this:
use Some::Module::That::Defines::A::Class;
our Some::Module::That::Defines::A::Class $foo := new;
and I keep thinking that that's too redundant. It's not so much that
On Fri, 11 Oct 2002 14:05:30 -0700, Michael Lazzaro wrote:
> Maybe postfix ! on a class name means to autoinstantiate an object of
> the named class only if/when first accessed:
>
> our FancyCache $cache; # declare, but leave undef
> our FancyCache! $cache;
On Thursday, October 10, 2002, at 05:11 PM, Larry Wall wrote:
my MyClass $obj = .new;
my new MyClass $obj;
Thanks for the clarification. I like those two OK, personally. If I
were chained to one of those, I wouldn't chew my leg off.
Tying it together with the other thread to mak
od is
called, where conversion from undef is equivalent to an argumentless .new().
: As far as the syntax for type declarations: I have less bees about
: this one. Clearly,
:
: my $obj is MyClass;
:
: should declare a variable of type MyClass. (You're right, it shouldn't
of the class,
there is no new() at all.)
As far as the syntax for type declarations: I have less bees about
this one. Clearly,
my $obj is MyClass;
should declare a variable of type MyClass. (You're right, it shouldn't
autoviv.) So what's the simplest syntax for typi
15 matches
Mail list logo