1package Object::Signature::File; 2 3use strict; 4use warnings; 5 6our $VERSION = '1.08'; 7use base 'Object::Signature'; 8 9 10##################################################################### 11# Main Methods 12 13sub signature_ext { 14 undef; 15} 16 17sub signature_name { 18 undef; 19} 20 211; 22 23__END__ 24 25=pod 26 27=head1 NAME 28 29Object::Signature::File - Extended signature API for storing objects in file 30 31=head1 DESCRIPTION 32 33Whereas the basic L<Object::Signature> class provides for only a raw 34cryptographic signature, B<Object::Signature::File> extends the 35signature method to add specialised information for objects that want 36some control over how they are stored as files. 37 38For example, some objects may want the cached object to have a matching 39file extension (for example a gif image) so that web-accessible cache 40path could be used in a web page. 41 42The image would then be sent out to the browser with the correct mime 43type. 44 45=head1 METHODS 46 47=head2 signature_ext 48 49The C<signature_ext> method indicates the preferable file extension 50for the content of the object, if applicable. 51 52If the method returns a string, it indicates the object should be stored 53in a file with a specific extension. 54 55If the method returns a null string, it indicates that the file should 56be stored with no extension. 57 58If the method return C<undef> (the default value), it indicates no 59preference for the extension of the file. 60 61=head2 signature_name 62 63This B<signature_name> method is the least-useful part of this extended 64API, and is rarely used. It is included mostly for completeness. 65 66If the method returns a string, it indicates the name part of a file 67name that the object should be stored in, if possible. 68 69If the method return a null string, it explicitly indicates there is 70no file name or a file name is not possible. 71 72If the method returns C<undef> (the default value), it indicates no 73preference for the name of the file. 74 75=head1 AUTHOR 76 77Adam Kennedy E<lt>adamk@cpan.orgE<gt> 78 79=head1 COPYRIGHT 80 81Copyright 2004 - 2007 Adam Kennedy. 82 83This program is free software; you can redistribute 84it and/or modify it under the same terms as Perl itself. 85 86The full text of the license can be found in the 87LICENSE file included with this module. 88 89=cut 90