]> git.decadent.org.uk Git - maypole.git/blobdiff - lib/Maypole/Session.pm
more small changes
[maypole.git] / lib / Maypole / Session.pm
index 47f68798b53fe8c415dafff18f3d9ae4e8a8dc16..309ff38e601e8fd9bac1959ea399fa63f5dfde82 100644 (file)
@@ -1,7 +1,36 @@
 package Maypole::Session;
 
+=head1 NAME
+
+Maypole::Session - Session related functionality for maypole
+
+=head1 SYNOPSIS
+
+use Maypole::Session;
+
+my $uid = Maypole::Session::generate_unique_id()
+
+=head1 DESCRIPTION
+
+This class provides session related methods for Maypole such as unique id's for requests.
+
+Currently it provides only the generate_unique_id() function, by checking the id's generated by this function and included in submitted forms, it is possible to see if a form has been submitted before.. implementing these checks is left to the developer of that application.
+
+Further functionality is to be added here in later versions to provide easy access to sessions, either through plugins or builtin methods.
+
+=head1 FUNCTIONS
+
+=head2 generate_unique_id()
+
+my $uid = Maypole::Session::generate_unique_id()
+
+generates a unique id and returns it, requires no arguments but accepts size, default is 32.
+
+=cut
+
 use strict;
 use Digest::MD5;
+our $VERSION = 0.01;
 
 sub generate_unique_id {
     my $length = shift || 32;
@@ -9,4 +38,31 @@ sub generate_unique_id {
     return;
 }
 
+
+###################################################################################################
+###################################################################################################
+
+=head1 TODO
+
+Currently implementing uniqueness tests of form submissions is left to the Maypole user, we plan to provide an optional default behaviour to automate this if required.
+
+=head1 SEE ALSO
+
+L<Maypole>
+
+=head1 MAINTAINER
+
+Aaron Trevena, c<teejay@droogs.org>
+
+=head1 AUTHOR
+
+Simon Cozens, C<simon@cpan.org>
+
+=head1 LICENSE
+
+You may distribute this code under the same terms as Perl itself.
+
+=cut
+
+
 1;