Fuse-Class
view release on metacpan or search on metacpan
test/fuse28.pm view on Meta::CPAN
return 0;
}
#
# Directory
#
package test::fuse28::Directory;
use Fcntl qw(:mode);
use base qw(test::fuse28::Entity);
use Scalar::Util qw(weaken);
sub new {
my $class = shift;
my $parent = shift;
my $self = $class->SUPER::new;
$self->{attr}->[2] = S_IFDIR | S_IRWXU;
if (!defined($parent)) {
$self->{parent} = $self;
}
else {
$self->{parent} = $parent;
}
$self->{children} = {};
# avoid cyclic reference
weaken($self->{parent});
bless $self, $class;
}
sub parent {
my $self = shift;
return $self->{parent};
}
sub entity {
test/fuse28.pm view on Meta::CPAN
return 0;
}
#
# Symlink
#
package test::fuse28::Symlink;
use base qw(test::fuse28::Entity);
use Scalar::Util qw(weaken);
sub new {
my $class = shift;
my ($existing) = @_;
my $self = $class->SUPER::new;
$self->{link} = $existing;
bless $self, $class;
}
( run in 0.514 second using v1.01-cache-2.11-cpan-65fba6d93b7 )