Rob Dixon wrote: [snip] > Yes, but it's > > $schedule_day_object->AddTrain($train_name); > > which does that for you. > > > If that is the case, then your parameter catch would be neater and > > more understandable as: > > my ($self, $trainName) = @_; > > > > or: > > my $self = shift; > > my $trainName = shift; > > It's a tradition that methods start with: > > my $self = shift; > my ( $trainName, $p1, $p2, $p3, @prest ) = @_; > > to separate the implicit parameter from the explcit one. > But what Rob R wrote will do just as well.
Thanks. Let me make sure I have this clear, then. Does any call to a class method then have the reference to the object, or the object itself, as the first parameter. In that case, it certainly does make sense to shift it back out before handling the rest.of the arguments Joseph -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
