The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Acme::CatFS

SYNOPSIS

  Acme::CatFS->new(mountpoint => '/tmp/catfs', debug => 0, cat_file => 'kitten.jpg')->run();

DESCRIPTION

Acme::CatFS will create a Fuse mountpoint and generate one virtual file, a random image of a cat. Will return a different image each time.

It is the equivalent to:

  Fuse::Simple::main(
    mountpoint => $mountpoint,
    "/"        => {
      'cat.jpg' => sub {
          LWP::Simple::get('http://thecatapi.com/api/images/get?format=src&type=jpg');
       },
    },
  );

METHODS

run

Will initialize the Fuse mountpoint.

SCRIPT

You can call acme-catfs helper script in you command line to easily create the mountpoint. Try acme-catfs -h to see the options.

ATTRIBUTES

mountpoint

Specify the directory mountpoint for Fuse. Should be an empty directory.

cat_url

Specify the url for the random pic of cat. Default is 'thecatapi.com' service.

cat_file

Specify the name of the file. Default is 'cat.jpg'

debug

If true, will run Fuse::Simple::main in debug mode.

forking

If true, we will fork then exit.

cached

if true, we will cache the cat picture instead download a new one.

SEE ALSO

Fuse::Simple and Fuse

ACKNOWLEDGE

Thanks to Julia Evans (twitter => @b0rk, blog => http://jvns.ca/) with the original idea and support on twitter. And Nick Waterman (pause => NOSEYNICK) by Fuse::Simple module - it is awesome!

AUTHOR

Tiago Peczenyj, <tiago.peczenyj@gmail.com>

COPYRIGHT AND LICENSE

Copyright (C) 2014 by Tiago Peczenyj

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.10.0 or, at your option, any later version of Perl 5 you may have available.