Andrew Sterling Hanenkamp > File-System-1.16 > File::System::Passthrough

Download:
File-System-1.16.tar.gz

Dependencies

Annotate this POD

CPAN RT

New  2
Open  0
View/Report Bugs
Module Version: 1.02   Source  

NAME ^

File::System::Passthrough - A file system module that delegates work to another

SYNOPSIS ^

  package File::System::MyModule;

  use strict;
  use base 'File::System::Passthrough';

  # You now have all methods available, just define those you must.

DESCRIPTION ^

This module is pretty useless on it's own. It simply delegates all the real work to an internal wrapped module. It shouldn't be used directly. However, I've found that many of the special modules written are used to wrap others and this provides the basic functionality.

SUBCLASSING

Basically, you can just declare File::System::Passthrough as your base class and be done. You can define as many or few other methods as you prefer. You can refer to the wrapped class like so:

  sub my_method {
      my $self = shift;
      my $wrapped_fs = $self->{fs};

      # ...
  }

As of this writing, no other key in the $self hash is used, so you can manipulate the other keys as you wish.

ADDITIONAL API

$obj = File::System->new('Passthrough', $wrapped_obj)

The constructor takes either a decendent of File::System::Object or a reference to an array that can be used to construct such an object in $wrapped_obj.

SEE ALSO ^

File::System, File::System::Object

AUTHOR ^

Andrew Sterling Hanenkamp, <hanenkamp@users.sourceforge.net>

COPYRIGHT AND LICENSE ^

Copyright 2005 Andrew Sterling Hanenkamp. All Rights Reserved.

This software is distributed and licensed under the same terms as Perl itself.

syntax highlighting: