G
gauthier
Looking into HTTP::Headers.pm, I am trying to understand what does the
underscore in line 267 mean.
sub date { shift->_date_header('Date',@_); }
Thefile version/date I used is : # $Id: Headers.pm,v 1.64 2005/12/08
12:11:48 gisle Exp $
I thought it was an overload but after reading a bit it does not look
like this. Overload dont seem to use an underscore as a valid
operator. The only code I could find in my Camel book is the "use
fields" page 846 of third edition. But in this code, it does not have
shift, it has only the object ref:
$rock->{_Pet_pid} = 1234; #private attribute
I have not found documentation about private attributes either.
Question 1:
How do you call this part ->_ within the next line:
sub date { shift->_date_header('Date',
@_); }
Question 2:
In this line:
sub date { shift->_date_header('Date',
@_); }
Is the shift representing the first argument of the array @_ from the
inheritance?
Thanks.
underscore in line 267 mean.
sub date { shift->_date_header('Date',@_); }
Thefile version/date I used is : # $Id: Headers.pm,v 1.64 2005/12/08
12:11:48 gisle Exp $
I thought it was an overload but after reading a bit it does not look
like this. Overload dont seem to use an underscore as a valid
operator. The only code I could find in my Camel book is the "use
fields" page 846 of third edition. But in this code, it does not have
shift, it has only the object ref:
$rock->{_Pet_pid} = 1234; #private attribute
I have not found documentation about private attributes either.
Question 1:
How do you call this part ->_ within the next line:
sub date { shift->_date_header('Date',
@_); }
Question 2:
In this line:
sub date { shift->_date_header('Date',
@_); }
Is the shift representing the first argument of the array @_ from the
inheritance?
Thanks.