NAME
SoggyOnion::Plugin - how to extend SoggyOnion
SYNOPSIS
# sample plugin that uses a file as its resource.
# needs a 'filename' key in the item hash in the config
package SoggyOnion::Plugin::File;
sub init {
my $self = shift;
die "I have no filename"
unless exists $self->{filename};
}
sub mod_time {
my $self = shift;
return [ stat $self->{filename} ]->[9];
}
sub content {
open( FH, "<$self->{filename}" ) or die $!
my $data = join('', <FH>);
close FH;
return $data;
}
DESCRIPTION
Docs to be added later.
SEE ALSO
AUTHOR
Ian Langworth <ian@>
COPYRIGHT AND LICENSE
Copyright (C) 2004 by Ian Langworth
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.