p1 Filesys::POSIX -- A real, in-memory filesystem written entirely in Perl By Erin Schönhals use strict; use warnings; use Filesys::POSIX; use Filesys::POSIX::Mem; use Filesys::POSIX::Real; my $fs = Filesys::POSIX->new(Filesys::POSIX::Mem->new); $fs->mkdir('/Perl Rules!'); $fs->mount(Filesys::POSIX::Real->new, '/Perl Rules!', 'special' => 'real:/mnt/42', 'noatime' => 1 ); p2 But why? p3 I needed real filesystem semantics in a place that had none. p4 But again, why? p5 I don't know. But it turned out to be really bloody useful. p6 Each filesystem object has its own unique namespace p7 Set any ownerships and permissions that I would want p8 Mount parts of filesystem devices in any number of filesystem objects p9 Map portions of the real filesystem p10 Have my own private file descriptors p11 And even generate tarballs from these things p12 Inodes p13 Mount points p14 Directory entries p15 Path resolution p16 $fs->stat() p17 Different filesystem types, same semantics p18 What does the code look like...? p19 [Switch windows!] p20 That's nice, but... p21 Write a FUSE module! p22 Make your own perverse /proc filesystem! p23 Serve the same content, but with different views and representations! p24 Anything, really p25 Don't be shy. p26 ~ fin ~ p27