Changeset 235 for veekun/trunk/lib/Vee.pm
- Timestamp:
- 06/12/07 22:20:16 (3 years ago)
- Files:
-
- 1 modified
-
veekun/trunk/lib/Vee.pm (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
veekun/trunk/lib/Vee.pm
r186 r235 54 54 __PACKAGE__->setup; 55 55 56 # grab the current revision number, if applicable 57 __PACKAGE__->cache->{svn_revision} = 58 Vee::Utils::timed_exec( 5 => sub { 59 open my $fh, '-|', 'svnversion' or return; 60 my $revision = <$fh>; 61 close $fh; 62 $revision =~ s/ \D+ $//gx; 63 return $revision; 64 } ); 65 56 66 { 57 67 no strict 'refs'; … … 85 95 =cut 86 96 87 my $cache = {};97 my $cache; 88 98 sub cache { 99 $cache ||= {}; # so we can call this function above 89 100 return $cache; 90 101 }
