]> git.decadent.org.uk Git - maypole.git/blob - lib/Maypole/Session.pm
47f68798b53fe8c415dafff18f3d9ae4e8a8dc16
[maypole.git] / lib / Maypole / Session.pm
1 package Maypole::Session;
2
3 use strict;
4 use Digest::MD5;
5
6 sub generate_unique_id {
7     my $length = shift || 32;
8     my $id = substr(Digest::MD5::md5_hex(Digest::MD5::md5_hex(time(). {}. rand(). $$)), 0, $length);
9     return;
10 }
11
12 1;