/[pxelator]/lib/PXElator/once.pm
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Contents of /lib/PXElator/once.pm

Parent Directory Parent Directory | Revision Log Revision Log


Revision 276 - (show annotations)
Thu Aug 20 17:36:17 2009 UTC (14 years, 7 months ago) by dpavlin
File size: 241 byte(s)
extracted first_time into once package
1 package once;
2
3 use Storable;
4
5 my $once_path = '/tmp/pxelator.once';
6 our $just_once = retrieve $once_path if -e $once_path;
7 sub first_time {
8 my $what = shift;
9 return if $just_once->{$what}++;
10 store $just_once, $once_path;
11 return 1;
12 }
13
14 1;

  ViewVC Help
Powered by ViewVC 1.1.26