use warnings;
use strict;
+use feature 'state';
use vars qw($VERSION $DEBUG %EXPORT_TAGS @EXPORT_OK @EXPORT);
use Exporter qw(import);
=cut
-my $_non_search_key_regex = qr/^(bugs|archive|usertags|schema)$/;
+state $_non_search_key_regex = qr/^(bugs|archive|usertags|schema)$/;
my %_get_bugs_common_options =
(package => {type => SCALAR|ARRAYREF,
);
-my $_get_bugs_options = {%_get_bugs_common_options};
+state $_get_bugs_options = {%_get_bugs_common_options};
sub get_bugs{
my %param = validate_with(params => \@_,
spec => $_get_bugs_options,
=cut
-my $_get_bugs_by_idx_options =
+state $_get_bugs_by_idx_options =
{hash_slice(%_get_bugs_common_options,
(qw(package submitter severity tag archive),
qw(owner src maint bugs correspondent),
=cut
-my $_get_bugs_by_db_options =
+state $_get_bugs_by_db_options =
{hash_slice(%_get_bugs_common_options,
(qw(package submitter severity tag archive),
qw(owner src maint bugs correspondent),
=cut
-my $_get_bugs_flatfile_options =
+state $_get_bugs_flatfile_options =
{hash_slice(%_get_bugs_common_options,
map {$_ eq 'dist'?():($_)} keys %_get_bugs_common_options
)
return grep {$packages{$_} >= $package_keys} keys %packages;
}
-my %field_match = (
+state %field_match = (
'subject' => \&__contains_field_match,
'tags' => sub {
my ($field, $values, $status) = @_;