use Data::Dumper;
-our $VERSION = '0.04';
+our $VERSION = '0.05';
=head1 NAME
=head1 DESCRIPTION
This module will use C<Fuse> module, part of C<FUSE (Filesystem in USErspace)>
-available at L<http://sourceforge.net/projects/avf> to mount
+available at L<http://fuse.sourceforge.net/> to mount
your database as file system.
That will give you possibility to use normal file-system tools (cat, grep, vi)
my $pid;
if ($arg->{'fork'}) {
+ $self->{'mounted'} = 1;
$pid = fork();
die "fork() failed: $!" unless defined $pid;
# child will return to caller
$self->{'read_filenames'} = sub { $self->read_filenames };
$self->read_filenames;
- $self->{'mounted'} = 1;
+ $self->{'mounted'} = 1 unless ($arg->{'fork'});
$fuse_self = \$self;
my $self = shift;
if ($self->{'mounted'}) {
- system "fusermount -u ".$self->{'mount'} || croak "umount error: $!";
+ system "fusermount -u ".$self->{'mount'} || warn "umount error: $!" && return 0;
}
return 1;
my %out;
foreach my $f (sort keys %files) {
if ($dirname) {
- if ($f =~ s/^\E$dirname\Q\///) {
+ if ($f =~ s/^\Q$dirname\E\///) {
$out{$f}++ if ($f =~ /^[^\/]+$/);
}
} else {
=head1 SEE ALSO
C<FUSE (Filesystem in USErspace)> website
-L<http://sourceforge.net/projects/avf>
+L<http://fuse.sourceforge.net/>
Example for WebGUI which comes with this distribution in
directory C<examples/webgui.pl>. It also contains a lot of documentation