perl bless with fat comma -
i know perl bless can take in 1 or 2 arg stated in perlbless. however, not understand bless fat comma in below code doing? same bless \$value,$class;
?
# construct tie. sub tiescalar { $class = shift; $value = shift || 0; bless \$value => $class; }
the fat comma way of writing comma
. can see :
perl -mo=deparse -e 'bless \$value => $class' bless \$value, $class; -e syntax ok
an interesting discussion can found here too.
Comments
Post a Comment