<quote>It's telling that Dominus didn't actually do the inlining</quote>
Yes, you are right... 1 point for Dominus!... but wait!... look at the FETCH method!!:Ohhh!! Inlining ahead!... he falls in the dark side of the coding force!!:sub FETCH { my ($self, $n) = @_; my $rec; # check the defer buffer $rec = $self->{deferred}{$n} if exists $self->{deferred}{$n}; $rec = $self->_fetch($n) unless defined $rec; # inlined _chomp1 substr($rec, - $self->{recseplen}) = "" if defined $rec && $self->{autochomp}; $rec; }
# Chomp one record in-place; return modified record sub _chomp1 { my ($self, $rec) = @_; return $rec unless $self->{autochomp}; return unless defined $rec; substr($rec, - $self->{recseplen}) = ""; $rec; }
:-) Sorry, it is friday!!
Have a nice weekend!! and thanks for your comments!
Cheers!
citromatik
In reply to Re^4: RFC:Hacking Tie::File to read complex data
by citromatik
in thread RFC:Hacking Tie::File to read complex data
by citromatik
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |