Changeset 1105

Show
Ignore:
Timestamp:
07/18/06 16:29:22
Author:
miyagawa
Message:

make Time::Duration::Parse optional.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/refactoring-planet/plagger/lib/Plagger/Rule/Fresh.pm

    r1104 r1105  
    22use strict; 
    33use base qw( Plagger::Rule ); 
    4  
    5 use Time::Duration::Parse; 
    64 
    75sub init { 
     
    4644        # if it's all digit, the unit is minutes 
    4745        return $duration * 60; 
     46    } 
     47 
     48    eval { require Time::Duration::Parse }; 
     49    if ($@) { 
     50        Plagger->context->error("You need to install Time::Duration::Parse to use human readable timespec"); 
    4851    } 
    4952