Changeset 239
- Timestamp:
- 03/02/06 16:04:38
- Files:
-
- trunk/plagger/lib/Plagger.pm (modified) (1 diff)
- trunk/plagger/lib/Plagger/Cache (added)
- trunk/plagger/lib/Plagger/Cache.pm (modified) (1 diff)
- trunk/plagger/lib/Plagger/Cache/Null.pm (added)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/plagger/lib/Plagger.pm
r225 r239 50 50 } 51 51 52 local *Plagger::context = sub { $self }; 53 52 54 $self->load_cache($opt{config}); 53 54 local *Plagger::context = sub { $self };55 55 $self->load_plugins(@{ $config->{plugins} || [] }); 56 56 $self->run(); trunk/plagger/lib/Plagger/Cache.pm
r238 r239 14 14 $conf->{params} ||= { 15 15 cache_root => File::Spec->catfile($conf->{base}, 'cache'), 16 default_expires_in => '30 minutes',17 16 }; 18 17 19 $conf->{class}->require or die $@; 18 $conf->{class}->require; 19 20 # If class is not loadable, falls back to on memory cache 21 if ($@) { 22 Plagger->context->log(error => "Can't load $conf->{class}. Fallbacks to Plagger::Cache::Null"); 23 require Plagger::Cache::Null; 24 $conf->{class} = 'Plagger::Cache::Null'; 25 } 20 26 21 27 my $self = bless {
