App-Alice

 view release on metacpan or  search on metacpan

inc/Module/Install.pm  view on Meta::CPAN

76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
# we shouldn't really depend on it. See RT #24194 for detail.
# (Also, this module only supports Perl 5.6 and above).
eval "use Win32::UTCFileTime" if $^O eq 'MSWin32' && $] >= 5.006;
 
# If the script that is loading Module::Install is from the future,
# then make will detect this and cause it to re-run over and over
# again. This is bad. Rather than taking action to touch it (which
# is unreliable on some platforms and requires write permissions)
# for now we should catch this and refuse to run.
if ( -f $0 ) {
        my $s = (stat($0))[9];
 
        # If the modification time is only slightly in the future,
        # sleep briefly to remove the problem.
        my $a = $s - time;
        if ( $a > 0 and $a < 5 ) { sleep 5 }
 
        # Too far in the future, throw an error.
        my $t = time;
        if ( $s > $t ) { die <<"END_DIE" }

lib/App/Alice.pm  view on Meta::CPAN

100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
  }
);
 
has history => (
  is      => 'rw',
  lazy    => 1,
  default => sub {
    my $self = shift;
    my $config = $self->config->path."/log.db";
    if (-e $config) {
      if ((stat($config))[9] < 1272757679) {
        print STDERR "Log schema is out of date, updating\n";
        copy($self->config->assetdir."/log.db", $config);
      }
    }
    else {
      copy($self->config->assetdir."/log.db", $config);
    }
    App::Alice::History->new(
      dbfile => $self->config->path ."/log.db"
    );



( run in 0.301 second using v1.01-cache-2.11-cpan-00829025b61 )