Subject: | append() does not work on File::Fu::File |
append() on a file object appears to do nothing:
DB<1> use File::Fu
DB<2> x $f = File::Fu::File->new('xdir')
0 File::Fu::File=HASH(0x7797c0)
'dir' => File::Fu::Dir=HASH(0xf9b260)
'dirs' => ARRAY(0xfa81a0)
0 '.'
'file' => 'xdir'
DB<3> x $f->append('.tmp')
0 File::Fu::File=HASH(0x7797c0)
'dir' => File::Fu::Dir=HASH(0xf9b260)
'dirs' => ARRAY(0xfa81a0)
0 '.'
'file' => 'xdir'
It would seem that this might be an issue with the lvalue-accessor from
Class::Accessor::Classy, since append is:
sub append {
my $self = shift;
my ($tail) = @_;
$self->file .= $tail;
$self;
}
For reference, I am using Perl 5.8.8 and the current CPAN version of
Class::Accessor::Classy (v0.9.0).