=head1 CHANGES
Comments received have been that it would be better to use AUTOSCALAR,
AUTOHASH etc instead of AUTOGLOB in the interests of encapsulation.
The argument being that if you only want to implement AUTO scalars in
your program, then doing:
Cif($type_of_thing eq 'scalar') {
The AUTOGLOB subroutine should expect to take two parameters, the invocant,
and a second parameter specifying what type of item is being AUTOGLOBbed,
followed by - in the case of a sub - the sub's arguments. We suggest that
the second parameter should be a scalar value - 'scalar' for an
Damian Conway wrote:
That's it! I'm gonna take that whole section out and burn it!
;-)
$1 is the *only* place in Perl where an index starts at 1. *It's* the one
that's inconsistent. Fix *it*.
I'd love to. But we're stuck, unless we make a $CMD which holds what $0
currently holds, which I
Tom Christiansen wrote:
Mostly harmless. Right before raising the famous "Can't locate method
..." error, Perl should check to see if Cautoload is in effect. If so,
it should read the Cautoload.conf config file and ...
***LINEARLY READ A FLAT FILE!!?!?!***
I didn't get into the guts too
=head2 Choice of notation
The placeholder notation has been chosen to be consistent with the
eisting Perl scalar notation (but using a ^ prefix rather than a $):
RoleScalar Placeholder
var analog
named
Michael G Schwern wrote:
I'm surprised there hasn't be a good overhaul of the prototyping
system proposeed yet. Your length() propsal wouldn't be the only
think that can't be prototyped. print() is the simplest example.
I think print should probably become something like what Eryq
Nathan Torkington wrote:
Turning Perl into a nagging harpie means that the really important
warnings will be ignored.
This line of thinking brought to you by Mark-Jason's excellent talk
on data typing.
I agree, and just read MJD's paper the other day (nice job, BTW), but
unfortunately
Johan Vromans wrote:
You can do that easily:
sub param {
my ($self, @rest) = @_;
$self-{aval} = @rest if @rest; # See note
lreturn $self-{aval};
}
I've been thinking about this for a couple days. The only problem I see
is that this doesn't allow me to do this:
Tom Christiansen wrote:
But I will *not* relish typing
STDERR-print("darn")
Agreed. The day this is required is the day Perl stops becoming fun and
starts becoming C++.
No matter what, I think that any basic script should be able to be
written without any -'s.
One goal of my RFC was
Damian Conway wrote:
Nor I. That's why I'd advocate mandatory braces on indirect objects.
I'd rather:
print {STDERR} "darn"
any day.
Sorry, I'm way against that. If you're going to force that, then just
enforce:
STDERR-print("darn")
Same amount of typing.
Indirect objects
Chaim Frenkel wrote:
NW$old = assign($var, $val);
NW$old = assign($var) = $val;
NW$old = assign = $var, $val;
I don't think that the assigned values should be moved by perl into
the argument list.
You are reintroducing another version of the list flattening problem.
"Where
Chaim Frenkel wrote:
Why this limitation?
If the lvalue is a fundemental type (whatever that is) everything works
as if the lvalue were actually in place
sub foo { return $a }
foo =~ s///;# same as $a =~ s///;
This is not the type of lvalue sub that this RFC
True.
I wonder if we could change '=' to always quote the lhs, even if
prefixed by '$', '@', or '%' (maybe we should only enable this
behaviour inside parameter lists?) That would allow us to do this.
That's gonna take some digestion time.
In the meantime, is there a reason the
Er, I thought we were talking about setting named parameters, not
default values.
sub foo ($name = 'Fred', $age = 32) { # defaults
# do stuff with $name and $age
}
foo('Barney', 31); # Positional assignment
foo($age:31,
14 matches
Mail list logo