use
5.006;
our
$VERSION
=
'1.0'
;
sub
collect {
my
$class
=
shift
;
my
$bryar
=
shift
;
croak
"Must pass in a Bryar object"
unless
UNIVERSAL::isa(
$bryar
,
"Bryar"
);
my
%args
=
@_
;
$bryar
->{arguments} = \
%args
;
delete
$args
{
format
};
if
(!
keys
%args
) {
return
$class
->collect_current(
$bryar
);
}
my
@docs
=
sort
{
$b
->epoch <=>
$a
->epoch }
$bryar
->{config}->source->search(
$bryar
,
%args
);
return
@docs
;
}
sub
collect_current {
my
$self
=
shift
;
my
$bryar
=
shift
;
croak
"Must pass in a Bryar object"
unless
UNIVERSAL::isa(
$bryar
,
"Bryar"
);
my
@docs
=
sort
{
$b
->epoch <=>
$a
->epoch }
$bryar
->{config}->source->search(
$bryar
,
limit
=>
$bryar
->{config}->recent());
return
@docs
;
}
=head1 LICENSE
This module is free software, and may be distributed under the same
terms as Perl itself.
=head1 AUTHOR
Copyright (C) 2003, Simon Cozens C<simon
@kasei
.com>
=head1 SEE ALSO
1;