Fuse is a Perl module that lets you implement filesystems in Perl, through the FUSE (Filesystem in USErspace) kernel/lib interface.
FUSE expects you to implement callbacks for the various functions.
In the following definitions, "errno" can be 0 (for a success), -EINVAL, -ENOENT, -EONFIRE, any integer less than 1 really.
You can import standard error constants by saying something like "use POSIX qw(EDOTDOT ENOANO);".
Every constant you need (file types, open() flags, error values, etc) can be imported either from POSIX or from Fcntl, often both. See their respective documentations, for more information.
my ($mountpoint) = "";
$mountpoint = shift(@ARGV) if @ARGV;
Fuse::main(mountpoint=>$mountpoint, getattr=>"main::my_getattr", getdir=>"main::my_getdir", ...);