-
-
08 Aug 2009 21:53:00 UTC
- Distribution: Log-Parallel
- Source (raw)
- Browse (raw)
- Changes
- How to Contribute
- Issues
- Testers (264 / 0 / 0)
- Kwalitee
Bus factor: 0- 69.16% Coverage
- License: unknown
- Activity
24 month- Tools
- Download (45.93KB)
- MetaCPAN Explorer
- Permissions
- Subscribe to distribution
- Permalinks
- This version
- Latest version
and 1 contributors-
David Muir Sharnoff
- Dependencies
- Callback
- Clone::PP
- Config::Checker
- DBI
- Data::Compare
- Data::Dumper
- Digest::MD5
- Encode
- Eval::LineNumbers
- File::Basename
- File::Flock
- File::Glob
- File::Path
- File::Slurp
- File::Slurp::Remote
- File::Temp
- Getopt::Long
- IO::Event
- Lingua::EN::Inflect
- List::EvenMoreUtils
- List::MoreUtils
- List::Util
- Module::Load
- Object::Dependency
- Proc::JobQueue
- RPC::ToWorker
- Search::Binary
- Sort::MergeSort
- Stream::Aggregate
- String::CRC
- Tie::Function::Examples
- Time::HiRes
- Time::ParseDate
- URI::Escape
- URI::Escape::XS
- YAML
- YAML::Syck
- and possibly others
- Reverse dependencies
- CPAN Testers List
- Dependency graph
Why not adopt me?
This distribution is up for adoption! If you're interested then please contact the PAUSE module admins via email.NAME
Log::Parallel::Durations - parse duration specifications
SYNOPSIS
use Log::Parallel::Durations; my $job = { frequency => 'daily', timespan => '30 days', }; my $jd = Time::JulianDay::julian_day(2008, 10, 22); my $jd_from_limit = Time::JulianDay::julian_day(2008, 8, 22); my $jd_to_limit = Time::JulianDay::julian_day(2008, 12, 14); ($timespec, @jd_range) = frequency_and_span($job, $jd, $jd_from_limit, $jd_to_limit);
DESCRIPTION
This is a helper module for the process_logs. It parses duration and frequency specifications.
It understands frequencies:
daily every 3 days every week each month on the 13th on the 1st each month on the 1st of each month every Tuesday on the 3rd Wednesday of each month
It understands durations:
3 days 1 quarter 2 years
The API meets the needs of process_logs. Given a start time (
$jd_from_limit
) and an end time ($jd_to_limit
) and a particular day ($jd
) and a structure that specifies the duration and frequency ($job
), it will return undef unless the particular day ($jd
) happens to meet the specification. Most jobs are expected to run daily so most of the time this is efficient.All dates are in Julian Days. Use Time::JulianDay.
See the code for more details.
LICENSE
This package may be used and redistributed under the terms of either the Artistic 2.0 or LGPL 2.1 license.
Module Install Instructions
To install Log::Parallel, copy and paste the appropriate command in to your terminal.
cpanm Log::Parallel
perl -MCPAN -e shell install Log::Parallel
For more information on module installation, please visit the detailed CPAN module installation guide.