NAME

File::Attributes::Base - Base class for File::Attributes

SYNOPSIS

Currently, this class works like a pragma. If something inherits from it, File::Attributes will assume it is trying to implement some sort of file attribute accessor.

METHODS

new

Creates an instance. You probably don't need to override this in your subclass.

applicable

Return true if this attribute class will work on this system. False by default.

METHODS THAT SUBCLASSES SHOULD IMPLEMENT

... but aren't required to, because $instance->can('method') will tell whoever's using the module that you're not implementing that method.

get($file, $attribute)

Return the value of $attribute on $file. Throw an exception if something bad happens, like $file doesn't exist, or the filesystem doesn't support your type of attribute.

set($file, $key, $value)

Set the attribute $key to $value on $file. Again, if something bad happpens, croak; don't return undef!

unset($file, $attribute)

Unset the attribute called $attribute. You probably shouldn't throw an exception if $attribute is already undefined, but if it makes sense in your context, feel free to.

list($file)

Return a list of all attributes that $file has.

applicable

Override this so you can return true, otherwise your module will be useless.

AUTHOR

Jonathan Rockway <jrockway@cpan.org>.

BUGS

Report to RT; see "BUGS" in File::Attributes.