/[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

Annotation of /lib/PXElator/once.pm

Parent Directory Parent Directory | Revision Log Revision Log


Revision 276 - (hide annotations)
Thu Aug 20 17:36:17 2009 UTC (14 years, 8 months ago) by dpavlin
File size: 241 byte(s)
extracted first_time into once package
1 dpavlin 276 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