The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.
#!/usr/bin/env perl

use strict;
use warnings;

$| ++;

use Vulcan::OptConf;
use Cronos::Policy;

$Vulcan::OptConf::THIS = 'cronos';
$Vulcan::OptConf::ARGC = 1;

=head1 SYNOPSIS

 $0 name --level number

=cut
my %o = Vulcan::OptConf->load()->get( 'level=i' )->dump();
my $time = time;
my $who = Cronos::Policy->new( "$o{data}/$ARGV[0]" )
   ->set( $time - Cronos::HOUR, $time + Cronos::HOUR )
   ->get( $time, $o{level} || 1 );

print $who->{item}, "\n";
exit 0;