Result:
found more than 916 distributions - search limited to the first 2001 files matching your query ( run in 0.474 )


App-Spoor

 view release on metacpan or  search on metacpan

t/AccessEntryParser.t  view on Meta::CPAN

  App::Spoor::AccessEntryParser::parse("$access_log_entry_forward_added\n"),
  \%parsed_log_entry_forward_added,
  'Parses an access log entry - adding a forward with a trailing newline'
);

my $access_log_entry_not_mailbox_level = '10.10.10.10 - foo [10/15/2018:17:47:27 -0000] ' .
  '"POST /cpsess0248462691/webmail/paper_lantern/mail/doaddfwd.html HTTP/1.1" 200 0 "https://cp4.capefox.co:2096/" ' .
  '"Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:61.0) Gecko/20100101 Firefox/61.0" "s" "-" 2096';
my %parsed_log_entry_not_mailbox_level = (
  type => 'access',
  ip => '10.10.10.10',
  credential => 'foo',
  log_time => DateTime->new(
    year => 2018,

t/AccessEntryParser.t  view on Meta::CPAN

  event => 'unrecognised',
  status => 'success'
);

is_deeply(
  App::Spoor::AccessEntryParser::parse($access_log_entry_not_mailbox_level),
  \%parsed_log_entry_not_mailbox_level,
  'Parses an access log entry - not mailbox level'
);

is_deeply(
  App::Spoor::AccessEntryParser::parse("$access_log_entry_not_mailbox_level\n"),
  \%parsed_log_entry_not_mailbox_level,
  'Parses an access log entry - not mailbox level with a trailing newline'
);

my $access_log_entry_incorrect_verb = '10.10.10.10 - rorymckinley%40blah.capefox.co [10/15/2018:17:47:27 -0000] ' .
  '"GET /cpsess0248462691/webmail/paper_lantern/mail/doaddfwd.html HTTP/1.1" 200 0 "https://cp4.capefox.co:2096/" ' .

t/AccessEntryParser.t  view on Meta::CPAN

  App::Spoor::AccessEntryParser::parse("$access_log_forward_removed\n"),
  \%parsed_forward_removed,
  'Parses an access log entry - removing a forward with a trailing newline'
);

my $access_log_forward_removed_not_mailbox = '10.10.10.10 - foobar [03/05/2019:10:38:37 -0000] ' .
  '"GET /cpsess9858418447/webmail/paper_lantern/mail/dodelfwd.html?email=rorymckinley%40blah.capefox.co' .
  '&emaildest=rorymckinley%2bcpanel%40gmail.com HTTP/1.1" 200 0 "https://cp6.capefox.co:2096/" ' .
  '"Mozilla/5.0 (X11; Fedora; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.96 ' .
  'Safari/537.36" "s" "-" 2096';

my %parsed_forward_removed_not_mailbox = (
  type => 'access',
  ip => '10.10.10.10',
  credential => 'foobar',
  log_time => DateTime->new(
    year => 2019,

t/AccessEntryParser.t  view on Meta::CPAN

  event => 'unrecognised',
  status => 'success'
);

is_deeply(
  App::Spoor::AccessEntryParser::parse($access_log_forward_removed_not_mailbox),
  \%parsed_forward_removed_not_mailbox,
  'Parses an access log entry - removing a forward not at mailbox level'
);

is_deeply(
  App::Spoor::AccessEntryParser::parse("$access_log_forward_removed_not_mailbox\n"),
  \%parsed_forward_removed_not_mailbox,
  'Parses an access log entry - removing a forward not at mailbox level with a trailing newline - '
);

my $access_log_forward_removed_fail = '10.10.10.10 - rorymckinley%40blah.capefox.co [03/05/2019:10:38:37 -0000] ' .
  '"GET /cpsess9858418447/webmail/paper_lantern/mail/dodelfwd.html?email=rorymckinley%40blah.capefox.co' .

 view all matches for this distribution


App-Sqitch

 view release on metacpan or  search on metacpan

t/add.t  view on Meta::CPAN

use Path::Class;
use Test::Exception;
use Test::Warn;
use Test::Dir;
use File::Temp 'tempdir';
use Test::File qw(file_not_exists_ok file_exists_ok);
use Test::File::Contents 0.05;
use File::Path qw(make_path remove_tree);
use Test::NoWarnings 0.083;
use lib 't/lib';
use MockOutput;

t/add.t  view on Meta::CPAN

    open my $fh, '>', $fn or die "Cannot open $fn: $!";
    say $fh "%project=add\n\n";
    close $fh or die "Error closing $fn: $!";
    END { remove_tree 'test-add' };
    my $out = file 'test-add', 'sqitch_change_test.sql';
    file_not_exists_ok $out;
    ok my $add = $CLASS->new(
        sqitch => $sqitch,
        template_directory => $tmpldir,
    ), 'Create add command';
    ok $add->_add('sqitch_change_test', $out, $tmpl, 'sqlite', 'add'),

t/add.t  view on Meta::CPAN

my $revert_file = file qw(test-add revert widgets_table.sql);
my $verify_file = file qw(test-add verify widgets_table.sql);

my $plan = $add->default_target->plan;
is $plan->get('widgets_table'), undef, 'Should not have "widgets_table" in plan';
dir_not_exists_ok +File::Spec->catdir('test-add', $_) for qw(deploy revert verify);
ok $add->execute('widgets_table'), 'Add change "widgets_table"';

# Reload the plan.
$reload->($plan);

t/add.t  view on Meta::CPAN

$revert_file = file qw(test-add revert foo_table.sql);
$verify_file = file qw(test-add ferify foo_table.sql);
$deploy_file->touch;

file_exists_ok $deploy_file;
file_not_exists_ok $_ for ($revert_file, $verify_file);
is $plan->get('foo_table'), undef, 'Should not have "foo_table" in plan';
ok $add->execute, 'Add change "foo_table"';
file_exists_ok $_ for ($deploy_file, $revert_file);
file_not_exists_ok $verify_file;
$plan = $add->default_target->plan;
isa_ok $change = $plan->get('foo_table'), 'App::Sqitch::Plan::Change',
    '"foo_table" change';
is_deeply \%request_params, {
    for => __ 'add',

t/add.t  view on Meta::CPAN

        for => __ 'add',
        scripts => [ map { $change->script_file($_) } qw(deploy revert whatev)]
    }, 'It should have prompted for a note';

    file_exists_ok $_ for ($deploy_file, $revert_file, $whatev_file);
    file_not_exists_ok $verify_file;
    file_contents_like $deploy_file, qr/^-- Deploy add:custom_script/,
        'Deploy script should look right';
    file_contents_like $revert_file, qr/^-- Revert add:custom_script/,
        'Revert script should look right';
    file_contents_like $whatev_file, qr/^-- Verify add:custom_script/,

t/add.t  view on Meta::CPAN

        my $dir = dir $_;
        $dir->mkpath;
        map { $dir->file($_, 'choc.sql') } qw(deploy revert verify);
    } qw(sqlite pg mysql);
    file_exists_ok $_ for @scripts[0..2];
    file_not_exists_ok $_ for @scripts[3..8];
    is_deeply +MockOutput->get_info, [
        (map { [__x 'Created {file}', file => $_] } @scripts[0..2]),
        [
            __x 'Added "{change}" to {file}',
            change => 'choc',

 view all matches for this distribution


App-Stacktrace

 view release on metacpan or  search on metacpan

ppport.h  view on Meta::CPAN

nextchar|||
ninstr|||
no_bareword_allowed|||
no_fh_allowed|||
no_op|||
not_a_number|||
nothreadhook||5.008000|
nuke_stacks|||
num_overflow|||n
offer_nice_chunk|||
oopsAV|||

ppport.h  view on Meta::CPAN

#  if !defined(__PATCHLEVEL_H_INCLUDED__) && !(defined(PATCHLEVEL) && defined(SUBVERSION))
#    define PERL_PATCHLEVEL_H_IMPLICIT
#    include <patchlevel.h>
#  endif
#  if !(defined(PERL_VERSION) || (defined(SUBVERSION) && defined(PATCHLEVEL)))
#    include <could_not_find_Perl_patchlevel.h>
#  endif
#  ifndef PERL_REVISION
#    define PERL_REVISION       (5)
     /* Replace: 1 */
#    define PERL_VERSION        PATCHLEVEL

 view all matches for this distribution


App-Starter

 view release on metacpan or  search on metacpan

t/boilerplate.t  view on Meta::CPAN


use strict;
use warnings;
use Test::More tests => 3;

sub not_in_file_ok {
    my ($filename, %regex) = @_;
    open( my $fh, '<', $filename )
        or die "couldn't open $filename for reading: $!";

    my %violated;

t/boilerplate.t  view on Meta::CPAN

    }
}

sub module_boilerplate_ok {
    my ($module) = @_;
    not_in_file_ok($module =>
        'the great new $MODULENAME'   => qr/ - The great new /,
        'boilerplate description'     => qr/Quick summary of what the module/,
        'stub function definition'    => qr/function[12]/,
    );
}

TODO: {
  local $TODO = "Need to replace the boilerplate text";

  not_in_file_ok(README =>
    "The README is used..."       => qr/The README is used/,
    "'version information here'"  => qr/to provide version information/,
  );

  not_in_file_ok(Changes =>
    "placeholder date/time"       => qr(Date/time)
  );

  module_boilerplate_ok('lib/App/Starter.pm');

 view all matches for this distribution


App-StaticImageGallery

 view release on metacpan or  search on metacpan

t/boilerplate.t  view on Meta::CPAN


use strict;
use warnings;
use Test::More tests => 3;

sub not_in_file_ok {
    my ($filename, %regex) = @_;
    open( my $fh, '<', $filename )
        or die "couldn't open $filename for reading: $!";

    my %violated;

t/boilerplate.t  view on Meta::CPAN

    }
}

sub module_boilerplate_ok {
    my ($module) = @_;
    not_in_file_ok($module =>
        'the great new $MODULENAME'   => qr/ - The great new /,
        'boilerplate description'     => qr/Quick summary of what the module/,
        'stub function definition'    => qr/function[12]/,
    );
}

TODO: {
  local $TODO = "Need to replace the boilerplate text";

  not_in_file_ok(README =>
    "The README is used..."       => qr/The README is used/,
    "'version information here'"  => qr/to provide version information/,
  );

  not_in_file_ok(Changes =>
    "placeholder date/time"       => qr(Date/time)
  );

  module_boilerplate_ok('lib/App/StaticImageGallery.pm');

 view all matches for this distribution


App-StockExchangeUtils

 view release on metacpan or  search on metacpan

lib/App/StockExchangeUtils.pm  view on Meta::CPAN


=item * B<add_codes.min> => I<str>

Only return records where the 'add_codes' field is greater than or equal to specified value.

=item * B<add_codes.not_contains> => I<str>

Only return records where the 'add_codes' field does not contain specified text.

=item * B<add_codes.not_in> => I<array[str]>

Only return records where the 'add_codes' field is not in the specified values.

=item * B<add_codes.xmax> => I<str>

lib/App/StockExchangeUtils.pm  view on Meta::CPAN


=item * B<add_names.min> => I<str>

Only return records where the 'add_names' field is greater than or equal to specified value.

=item * B<add_names.not_contains> => I<str>

Only return records where the 'add_names' field does not contain specified text.

=item * B<add_names.not_in> => I<array[str]>

Only return records where the 'add_names' field is not in the specified values.

=item * B<add_names.xmax> => I<str>

lib/App/StockExchangeUtils.pm  view on Meta::CPAN


=item * B<add_yf_codes.min> => I<str>

Only return records where the 'add_yf_codes' field is greater than or equal to specified value.

=item * B<add_yf_codes.not_contains> => I<str>

Only return records where the 'add_yf_codes' field does not contain specified text.

=item * B<add_yf_codes.not_in> => I<array[str]>

Only return records where the 'add_yf_codes' field is not in the specified values.

=item * B<add_yf_codes.xmax> => I<str>

lib/App/StockExchangeUtils.pm  view on Meta::CPAN


=item * B<city.min> => I<str>

Only return records where the 'city' field is greater than or equal to specified value.

=item * B<city.not_contains> => I<str>

Only return records where the 'city' field does not contain specified text.

=item * B<city.not_in> => I<array[str]>

Only return records where the 'city' field is not in the specified values.

=item * B<city.xmax> => I<str>

lib/App/StockExchangeUtils.pm  view on Meta::CPAN


=item * B<code.min> => I<str>

Only return records where the 'code' field is greater than or equal to specified value.

=item * B<code.not_contains> => I<str>

Only return records where the 'code' field does not contain specified text.

=item * B<code.not_in> => I<array[str]>

Only return records where the 'code' field is not in the specified values.

=item * B<code.xmax> => I<str>

lib/App/StockExchangeUtils.pm  view on Meta::CPAN


=item * B<country.min> => I<str>

Only return records where the 'country' field is greater than or equal to specified value.

=item * B<country.not_contains> => I<str>

Only return records where the 'country' field does not contain specified text.

=item * B<country.not_in> => I<array[str]>

Only return records where the 'country' field is not in the specified values.

=item * B<country.xmax> => I<str>

lib/App/StockExchangeUtils.pm  view on Meta::CPAN


=item * B<eng_name.min> => I<str>

Only return records where the 'eng_name' field is greater than or equal to specified value.

=item * B<eng_name.not_contains> => I<str>

Only return records where the 'eng_name' field does not contain specified text.

=item * B<eng_name.not_in> => I<array[str]>

Only return records where the 'eng_name' field is not in the specified values.

=item * B<eng_name.xmax> => I<str>

lib/App/StockExchangeUtils.pm  view on Meta::CPAN


=item * B<founded.min> => I<str>

Only return records where the 'founded' field is greater than or equal to specified value.

=item * B<founded.not_contains> => I<str>

Only return records where the 'founded' field does not contain specified text.

=item * B<founded.not_in> => I<array[str]>

Only return records where the 'founded' field is not in the specified values.

=item * B<founded.xmax> => I<str>

lib/App/StockExchangeUtils.pm  view on Meta::CPAN


=item * B<local_name.min> => I<str>

Only return records where the 'local_name' field is greater than or equal to specified value.

=item * B<local_name.not_contains> => I<str>

Only return records where the 'local_name' field does not contain specified text.

=item * B<local_name.not_in> => I<array[str]>

Only return records where the 'local_name' field is not in the specified values.

=item * B<local_name.xmax> => I<str>

lib/App/StockExchangeUtils.pm  view on Meta::CPAN


=item * B<mic.min> => I<str>

Only return records where the 'mic' field is greater than or equal to specified value.

=item * B<mic.not_contains> => I<str>

Only return records where the 'mic' field does not contain specified text.

=item * B<mic.not_in> => I<array[str]>

Only return records where the 'mic' field is not in the specified values.

=item * B<mic.xmax> => I<str>

lib/App/StockExchangeUtils.pm  view on Meta::CPAN


=item * B<status.min> => I<str>

Only return records where the 'status' field is greater than or equal to specified value.

=item * B<status.not_contains> => I<str>

Only return records where the 'status' field does not contain specified text.

=item * B<status.not_in> => I<array[str]>

Only return records where the 'status' field is not in the specified values.

=item * B<status.xmax> => I<str>

lib/App/StockExchangeUtils.pm  view on Meta::CPAN


=item * B<types.min> => I<str>

Only return records where the 'types' field is greater than or equal to specified value.

=item * B<types.not_contains> => I<str>

Only return records where the 'types' field does not contain specified text.

=item * B<types.not_in> => I<array[str]>

Only return records where the 'types' field is not in the specified values.

=item * B<types.xmax> => I<str>

lib/App/StockExchangeUtils.pm  view on Meta::CPAN


=item * B<yf_code.min> => I<str>

Only return records where the 'yf_code' field is greater than or equal to specified value.

=item * B<yf_code.not_contains> => I<str>

Only return records where the 'yf_code' field does not contain specified text.

=item * B<yf_code.not_in> => I<array[str]>

Only return records where the 'yf_code' field is not in the specified values.

=item * B<yf_code.xmax> => I<str>

 view all matches for this distribution


App-Tel

 view release on metacpan or  search on metacpan

local/lib/perl5/Module/ScanDeps.pm  view on Meta::CPAN

    my ($rv_sub, $rv) = @_;

    my $key;
    foreach $key (keys(%$rv_sub)) {
        my %mark;
        if ($rv->{$key} and _not_dup($key, $rv, $rv_sub)) {
            warn "Different modules for file '$key' were found.\n"
                . " -> Using '" . _abs_path($rv_sub->{$key}{file}) . "'.\n"
                . " -> Ignoring '" . _abs_path($rv->{$key}{file}) . "'.\n";
            $rv->{$key}{used_by} = [
                grep (!$mark{$_}++,

local/lib/perl5/Module/ScanDeps.pm  view on Meta::CPAN

            @{ $rv->{$key}{used_by} } = grep length, @{ $rv->{$key}{used_by} };
        }
    }
}

sub _not_dup {
    my ($key, $rv1, $rv2) = @_;
    if (File::Spec->case_tolerant()) {
        return lc(_abs_path($rv1->{$key}{file})) ne lc(_abs_path($rv2->{$key}{file}));
    }
    else {

 view all matches for this distribution


App-TemplateCMD

 view release on metacpan or  search on metacpan

t/boilerplate.t  view on Meta::CPAN

use strict;
use warnings;
use Test::More;
use Test::Warnings;

sub not_in_file_ok {
    my ($filename, %regex) = @_;
    open( my $fh, '<', $filename )
        or die "couldn't open $filename for reading: $!";

    my %violated;

t/boilerplate.t  view on Meta::CPAN

}

sub module_boilerplate_ok {
    my ($module) = @_;
    subtest $module => sub {
        not_in_file_ok($module =>
            'the great new $MODULENAME' => qr/ - The great new /,
            'boilerplate description'   => qr/Quick summary of what the module/,
            'stub function definition'  => qr/function[12]/,
            'module description'        => qr/One-line description of module/,
            'description'               => qr/A full description of the module/,

t/boilerplate.t  view on Meta::CPAN

        );
    };
}

subtest 'README' => sub {
    not_in_file_ok((-f 'README' ? 'README' : 'README.pod') =>
        "The README is used..."       => qr/The README is used/,
        "'version information here'"  => qr/to provide version information/,
    );
};

subtest 'Changes' => sub {
    not_in_file_ok(Changes =>
        "placeholder date/time"       => qr(Date/time)
    );
};

module_boilerplate_ok('bin/templatecmd');

 view all matches for this distribution


App-Templer

 view release on metacpan or  search on metacpan

lib/Templer/Site.pm  view on Meta::CPAN

    my $dir =
      $args{ 'directory' } || $self->{ 'directory' } || $self->{ 'input' };
    my $suffix = $args{ 'suffix' } || $self->{ 'suffix' };

    return (
             $self->_findFiles( must_not_match => $suffix . "\$",
                                object         => "Templer::Site::Asset",
                                directory      => $dir,
                                hide_dotfiles  => 0,
                              ) );

lib/Templer/Site.pm  view on Meta::CPAN

            next if ( -d $file );
            next unless ( $file =~ /$args{'must_match'}/ );
            push( @matches, $class->new( file => $file ) );
        }
    }
    elsif ( $args{ 'must_not_match' } )
    {
        foreach my $file ( sort keys %files )
        {
            next if ( $file =~ /$args{'must_not_match'}/ );
            push( @matches, $class->new( file => $file ) );
        }
    }
    else
    {

 view all matches for this distribution


App-ThinPacker

 view release on metacpan or  search on metacpan

lib/App/ThinPacker.pm  view on Meta::CPAN

               @$includes;

    my $inject = join '', map { s/%%DEPS%%/$deps/; $_ } <DATA>;

    open my $script, '<', $arg or exit print "Cannot open $arg: $!\n";
    my $not_injected = 1;
    while (my $line = <$script>) {
        if ($line =~ /^use / && $not_injected) {
            print "BEGIN {\n$inject\n}\n";
            $not_injected = 0;
        }

        print $line;
    }
}

 view all matches for this distribution


App-TimeTracker

 view release on metacpan or  search on metacpan

t/Command/core.t  view on Meta::CPAN

    @ARGV = ('init');
    my $class = $p->setup_class( {} );

    file_exists_ok( $home->file('projects.json') );
    file_exists_ok( $home->file('tracker.json') );
    file_not_exists_ok( $tmp->file( 'some_project',  '.tracker.json' ) );
    file_not_exists_ok( $tmp->file( 'other_project', '.tracker.json' ) );

    $p->_build_home($home);

    my $t = $class->name->new( home => $home, config => {}, _current_project => 'some_project' );
    trap { $t->cmd_init( $tmp->subdir('some_project') ) };

t/Command/core.t  view on Meta::CPAN

    file_exists_ok( $tmp->file( 'some_project', '.tracker.json' ) );

}

{    # init (setting project name)
    file_not_exists_ok( $tmp->file( 'project_name_auto',  '.tracker.json' ) );
    file_not_exists_ok( $tmp->file( 'project_name_custom', '.tracker.json' ) );

    @ARGV = ('init');
    my $class = $p->setup_class( {} );

    {

t/Command/core.t  view on Meta::CPAN


{    # start
    @ARGV = ('start');
    my $class = $p->setup_class($c1);

    file_not_exists_ok( $tracker_dir->file( $basetf . '140000_some_project.trc' ),
        'tracker file does not exist yet' );
    my $t = $class->name->new(
        home             => $home,
        config           => $c1,
        _current_project => 'some_project',
        at               => '14:00'
    );
    trap { $t->cmd_start };
    is( $trap->stdout, "Started working on some_project at 14:00:00\n", 'start: output' );
    file_not_empty_ok( $tracker_dir->file( $basetf . '140000_some_project.trc' ),
        'tracker file exists' );
}

{    # current

t/Command/core.t  view on Meta::CPAN

    my $t = $class->name->new( home => $home, config => $c1, _current_project => 'some_project' );
    trap { $t->cmd_append };
    is( $trap->stdout, "Started working on some_project at 14:15:00\n", 'stop: output' );

    my $trc = $tracker_dir->file( $basetf . '141500_some_project.trc' );
    file_not_empty_ok( $trc, 'tracker file exists' );
    my $task = App::TimeTracker::Data::Task->load( $trc->stringify );
    is( $task->stop, undef, 'task stop not set' );
}

{    # init other project
    file_not_exists_ok( $tmp->file( 'other_project', '.tracker.json' ) );

    @ARGV = ('init');
    my $class = $p->setup_class( {} );

    my $t = $class->name->new( home => $home, config => {}, _current_project => 'other_project' );

t/Command/core.t  view on Meta::CPAN


{    # start other project
    @ARGV = ('start');
    my $class = $p->setup_class($c2);
    my $trc   = $tracker_dir->file( $basetf . '143000_other_project.trc' );
    file_not_exists_ok( $trc, 'tracker file does not exist yet' );

    my $t = $class->name->new(
        home             => $home,
        config           => $c2,
        _current_project => 'other_project',

t/Command/core.t  view on Meta::CPAN

    trap { $t->cmd_start };
    is( $trap->stdout,
        "Worked 00:15:00 on some_project\nStarted working on other_project at 14:30:00\n",
        'start: output'
    );
    file_not_empty_ok( $trc, 'tracker file exists' );

    my $task = App::TimeTracker::Data::Task->load(
        $tracker_dir->file( $basetf . '141500_some_project.trc' )->stringify );
    is( $task->seconds,  15 * 60,    'prev task seconds' );
    is( $task->duration, '00:15:00', 'prev task duration' );

 view all matches for this distribution


App-Todo

 view release on metacpan or  search on metacpan

bin/todo.pl  view on Meta::CPAN

        $t->{requestor} =~ s/<nobody>/<nobody\@localhost>/;
        
        my ($owner) = Email::Address->parse($t->{owner});
        my ($requestor) = Email::Address->parse($t->{requestor});

        my $not_owner = lc $owner->address ne lc $config{email};
        my $not_requestor = lc $requestor->address ne lc $config{email};
        if( $t->{group} || $not_owner || $not_requestor ) {
            print color('reset'), ' ', color('dark');
            print '(';
            print join(", ",
                       $t->{group} || "personal",
                       $not_requestor ? "for " . $requestor->name : (),
                       $not_owner ? "by " . $owner->name : (),
                      );
            print ')';
        }
        
        print color('reset');

 view all matches for this distribution


App-Toodledo

 view release on metacpan or  search on metacpan

t/boilerplate.t  view on Meta::CPAN


use strict;
use warnings;
use Test::More tests => 3;

sub not_in_file_ok {
    my ($filename, %regex) = @_;
    open( my $fh, '<', $filename )
        or die "couldn't open $filename for reading: $!";

    my %violated;

t/boilerplate.t  view on Meta::CPAN

    }
}

sub module_boilerplate_ok {
    my ($module) = @_;
    not_in_file_ok($module =>
        'the great new $MODULENAME'   => qr/ - The great new /,
        'boilerplate description'     => qr/Quick summary of what the module/,
        'stub function definition'    => qr/function[12]/,
    );
}

  not_in_file_ok(README =>
    "The README is used..."       => qr/The README is used/,
    "'version information here'"  => qr/to provide version information/,
  );

  not_in_file_ok(Changes =>
    "placeholder date/time"       => qr(Date/time)
  );

  module_boilerplate_ok('lib/App/Toodledo.pm');

 view all matches for this distribution


App-TypecastTemplates

 view release on metacpan or  search on metacpan

xt/boilerplate.t  view on Meta::CPAN

use warnings;
use Test::More;

plan tests => 3;

sub not_in_file_ok {
    my ($filename, %regex) = @_;
    open( my $fh, '<', $filename )
        or die "couldn't open $filename for reading: $!";

    my %violated;

xt/boilerplate.t  view on Meta::CPAN

    }
}

sub module_boilerplate_ok {
    my ($module) = @_;
    not_in_file_ok($module =>
        'the great new $MODULENAME'   => qr/ - The great new /,
        'boilerplate description'     => qr/Quick summary of what the module/,
        'stub function definition'    => qr/function[12]/,
    );
}

TODO: {
  local $TODO = "Need to replace the boilerplate text";

  not_in_file_ok(README =>
    "The README is used..."       => qr/The README is used/,
    "'version information here'"  => qr/to provide version information/,
  );

  not_in_file_ok(Changes =>
    "placeholder date/time"       => qr(Date/time)
  );

  module_boilerplate_ok('lib/App/TypecastTemplates.pm');

 view all matches for this distribution


App-Unix-RPasswd

 view release on metacpan or  search on metacpan

t/boilerplate.t  view on Meta::CPAN


use strict;
use warnings;
use Test::More tests => 7;

sub not_in_file_ok {
    my ($filename, %regex) = @_;
    open( my $fh, '<', $filename )
        or die "couldn't open $filename for reading: $!";

    my %violated;

t/boilerplate.t  view on Meta::CPAN

    }
}

sub module_boilerplate_ok {
    my ($module) = @_;
    not_in_file_ok($module =>
        'the great new $MODULENAME'   => qr/ - The great new /,
        'boilerplate description'     => qr/Quick summary of what the module/,
        'stub function definition'    => qr/function[12]/,
    );
}

TODO: {
  local $TODO = "Need to replace the boilerplate text";

  not_in_file_ok(README =>
    "The README is used..."       => qr/The README is used/,
    "'version information here'"  => qr/to provide version information/,
  );

  not_in_file_ok(Changes =>
    "placeholder date/time"       => qr(Date/time)
  );

  module_boilerplate_ok('script/rpasswd');  
  module_boilerplate_ok('lib/App/Unix/RPasswd.pm');

 view all matches for this distribution


App-VOJournal

 view release on metacpan or  search on metacpan

t/boilerplate.t  view on Meta::CPAN

use warnings FATAL => 'all';
use Test::More;

plan tests => 3;

sub not_in_file_ok {
    my ($filename, %regex) = @_;
    open( my $fh, '<', $filename )
        or die "couldn't open $filename for reading: $!";

    my %violated;

t/boilerplate.t  view on Meta::CPAN

    }
}

sub module_boilerplate_ok {
    my ($module) = @_;
    not_in_file_ok($module =>
        'the great new $MODULENAME'   => qr/ - The great new /,
        'boilerplate description'     => qr/Quick summary of what the module/,
        'stub function definition'    => qr/function[12]/,
    );
}

TODO: {
  local $TODO = "Need to replace the boilerplate text";

  not_in_file_ok(README =>
    "The README is used..."       => qr/The README is used/,
    "'version information here'"  => qr/to provide version information/,
  );

  not_in_file_ok(Changes =>
    "placeholder date/time"       => qr(Date/time)
  );

  module_boilerplate_ok('lib/App/VOJournal.pm');

 view all matches for this distribution


App-VTide

 view release on metacpan or  search on metacpan

lib/App/VTide/Command/Run.pm  view on Meta::CPAN

    my $count = 0;

  GLOB:
    while ( my $glob = shift @globs ) {
        last if $count++ > 30;
        my ($not_glob) = $glob =~ /^[!](.*)$/;

        if ($not_glob) {
            my %not_files = map { $_ => 1 }
              $self->_globs2files( $groups, $helper, $recurse, $not_glob );
            @files = grep { !$not_files{$_} } @files;
            next GLOB;
        }
        elsif ( $groups->{$glob} ) {
            unshift @globs, @{ $groups->{$glob} };
            next GLOB;

 view all matches for this distribution


App-VW

 view release on metacpan or  search on metacpan

t/boilerplate.t  view on Meta::CPAN


use strict;
use warnings;
use Test::More tests => 3;

sub not_in_file_ok {
    my ($filename, %regex) = @_;
    open( my $fh, '<', $filename )
        or die "couldn't open $filename for reading: $!";

    my %violated;

t/boilerplate.t  view on Meta::CPAN

    }
}

sub module_boilerplate_ok {
    my ($module) = @_;
    not_in_file_ok($module =>
        'the great new $MODULENAME'   => qr/ - The great new /,
        'boilerplate description'     => qr/Quick summary of what the module/,
        'stub function definition'    => qr/function[12]/,
    );
}

TODO: {
  local $TODO = "Need to replace the boilerplate text";

  not_in_file_ok(README =>
    "The README is used..."       => qr/The README is used/,
    "'version information here'"  => qr/to provide version information/,
  );

  not_in_file_ok(Changes =>
    "placeholder date/time"       => qr(Date/time)
  );

  module_boilerplate_ok('lib/App/VW.pm');

 view all matches for this distribution


App-Validation-Automation

 view release on metacpan or  search on metacpan

t/boilerplate.t  view on Meta::CPAN

use lib qw(
    /home/vj504j/App-Validation-Automation-0.01/lib /home/vj504j/perllib
);
use Test::More tests => 3;

sub not_in_file_ok {
    my ($filename, %regex) = @_;
    open( my $fh, '<', $filename )
        or die "couldn't open $filename for reading: $!";

    my %violated;

t/boilerplate.t  view on Meta::CPAN

    }
}

sub module_boilerplate_ok {
    my ($module) = @_;
    not_in_file_ok($module =>
        'the great new $MODULENAME'   => qr/ - The great new /,
        'boilerplate description'     => qr/Quick summary of what the module/,
        'stub function definition'    => qr/function[12]/,
    );
}

TODO: {
  local $TODO = "Need to replace the boilerplate text";

  not_in_file_ok(README =>
    "The README is used..."       => qr/The README is used/,
    "'version information here'"  => qr/to provide version information/,
  );

  not_in_file_ok(Changes =>
    "placeholder date/time"       => qr(Date/time)
  );

  module_boilerplate_ok('lib/App/Validation/Automation.pm');

 view all matches for this distribution


App-VirtualBoxUtils

 view release on metacpan or  search on metacpan

lib/App/VirtualBoxUtils.pm  view on Meta::CPAN

#         return [304,
#                 $num_start_requests ? "All browsers already have processes" :
#                     "Not ${which_action}ing any browsers"];
#     }

#     my (%alive, %not_alive);
#     if ($args{-dry_run}) {
#         %alive = %started;
#     } else {
#         for my $wait_time (2, 5, 10) {
#             %alive = ();
#             %not_alive = ();
#             log_trace "Checking if the started browsers are alive ...";
#             for my $browser (keys %pbs) {
#                 if ($pbs{$browser}->alive) {
#                     $alive{$browser}++;
#                 } else {
#                     $not_alive{$browser}++;
#                 }
#             }
#             last if scalar(keys %alive) == $num_started;
#         }
#     }

#     my $num_alive = keys %alive;
#     my $num_not_alive = keys %not_alive;

#     my $status;
#     my $reason;
#     my $msg;
#     my $verb_started = $which_action eq 'restart' ? 'Started/restarted' : 'Started';

lib/App/VirtualBoxUtils.pm  view on Meta::CPAN

#         $status = 200;
#         $reason = "OK";
#         $msg = "$verb_started ".join(", ", sort keys %alive);
#     } elsif ($num_alive == 0) {
#         $status = 500;
#         $reason = $msg = "Can't start any browser (".join(", ", %not_alive).")";
#     } else {
#         $status = 200;
#         $reason = "OK";
#         $msg = "$verb_started ".join(", ", sort keys %alive)."; but failed to start ".
#             join(", ", sort keys %not_alive);
#     }

#     $fail{$_} //= "Can't start" for keys %not_alive;

#     [$status, $msg, undef, {
#         'func.outputs' => \%outputs,
#         ($which_action eq 'start' ? ('func.has_processes' => [sort keys %has_processes]) : ()),
#         'func.started' => [sort grep {!$terminated{$_}} keys %alive],

 view all matches for this distribution


App-WRT

 view release on metacpan or  search on metacpan

MANIFEST  view on Meta::CPAN

example/blog/archives/icon_test/textfile
example/blog/archives/icon_test/textfile.icon.png
example/blog/archives/image_test/index
example/blog/archives/image_test/machin_stderr.png
example/blog/archives/include_test/index
example/blog/archives/noexpand_test/do_not_expand_me
example/blog/archives/noexpand_test/index
example/blog/archives/noexpand_test/wrt-noexpand.prop
example/blog/archives/prop_value_test/foo.prop
example/blog/archives/tags_test/tag.animals.platypus.prop
example/blog/archives/tags_test/tag.topics.example.prop

MANIFEST  view on Meta::CPAN

example/blog/public/icon_test/textfile/index.html
example/blog/public/image_test/index.html
example/blog/public/image_test/machin_stderr.png
example/blog/public/include_test/index.html
example/blog/public/index.html
example/blog/public/noexpand_test/do_not_expand_me/index.html
example/blog/public/noexpand_test/index.html
example/blog/public/noexpand_test/wrt-noexpand.prop
example/blog/templates/default
example/blog/wrt.json
example/flat_site/pages/index

 view all matches for this distribution


App-Waf

 view release on metacpan or  search on metacpan

xt/boilerplate.t  view on Meta::CPAN

use warnings;
use Test::More;

plan tests => 3;

sub not_in_file_ok {
    my ($filename, %regex) = @_;
    open( my $fh, '<', $filename )
        or die "couldn't open $filename for reading: $!";

    my %violated;

xt/boilerplate.t  view on Meta::CPAN

    }
}

sub module_boilerplate_ok {
    my ($module) = @_;
    not_in_file_ok($module =>
        'the great new $MODULENAME'   => qr/ - The great new /,
        'boilerplate description'     => qr/Quick summary of what the module/,
        'stub function definition'    => qr/function[12]/,
    );
}

TODO: {
  local $TODO = "Need to replace the boilerplate text";

  not_in_file_ok(README =>
    "The README is used..."       => qr/The README is used/,
    "'version information here'"  => qr/to provide version information/,
  );

  not_in_file_ok(Changes =>
    "placeholder date/time"       => qr(Date/time)
  );

  module_boilerplate_ok('lib/App/Waf.pm');

 view all matches for this distribution


App-War

 view release on metacpan or  search on metacpan

lib/App/War.pm  view on Meta::CPAN

}

=head2 $war->rank

Starts the process of uniquely ordering the graph vertices.  This method
calls method C<tsort_not_unique> until it returns false, I<i.e.> we have a
unique topo sort.

=cut

sub rank {
    my $self = shift;
    while (my $v = $self->tsort_not_unique) {
        $self->compare($v->[0], $v->[1]);
    }
    return $self;
}

=head2 $war->tsort_not_unique

This method returns a true value (more on this later) if the graph
currently lacks a unique topo sort.  If the graph B<has> a unique sort, the
"war" is over, and results should be reported.

lib/App/War.pm  view on Meta::CPAN

This property of the topological sort is used to ensure that we have a
unique ordering of the "combatants" in our "war".

=cut

sub tsort_not_unique {
    my $self = shift;

    # search for unordered items by calculating the topological sort and
    # verifying that adjacent items are connected by a directed edge

 view all matches for this distribution


App-WatchLater

 view release on metacpan or  search on metacpan

xt/boilerplate.t  view on Meta::CPAN

use warnings;
use Test::More;

plan tests => 4;

sub not_in_file_ok {
  my ($filename, %regex) = @_;
  open( my $fh, '<', $filename )
    or die "couldn't open $filename for reading: $!";

  my %violated;

xt/boilerplate.t  view on Meta::CPAN

  }
}

sub module_boilerplate_ok {
  my ($module) = @_;
  not_in_file_ok($module =>
    'the great new $MODULENAME'   => qr/ - The great new /,
    'boilerplate description'     => qr/Quick summary of what the module/,
    'stub function definition'    => qr/function[12]/,
  );
}

not_in_file_ok(README =>
  "The README is used..."         => qr/The README is used/,
  "'version information here'"    => qr/to provide version information/,
);

not_in_file_ok(Changes =>
  "placeholder date/time"         => qr(Date/time)
);

module_boilerplate_ok('lib/App/WatchLater.pm');
module_boilerplate_ok('lib/App/WatchLater/YouTube.pm');

 view all matches for this distribution


App-WordListUtils

 view release on metacpan or  search on metacpan

script/list-wordlist-modules  view on Meta::CPAN

 detail (see --detail)
 dynamic (see --dynamic)
 dynamic.in (see --dynamic-in)
 dynamic.is (see --dynamic-is)
 dynamic.isnt (see --dynamic-isnt)
 dynamic.not_in (see --dynamic-not-in)
 exclude_fields (see --exclude-field)
 fields (see --field)
 format (see --format)
 naked_res (see --naked-res)
 num_params (see --num-params)
 num_params.in (see --num-params-in)
 num_params.is (see --num-params-is)
 num_params.isnt (see --num-params-isnt)
 num_params.not_in (see --num-params-not-in)
 num_words (see --num-words)
 num_words.in (see --num-words-in)
 num_words.is (see --num-words-is)
 num_words.isnt (see --num-words-isnt)
 num_words.not_in (see --num-words-not-in)
 query (see --query)
 random (see --random)
 result_limit (see --result-limit)
 result_start (see --result-start)
 sort (see --sort)

script/list-wordlist-modules  view on Meta::CPAN

 sort.in (see --sort-in)
 sort.is (see --sort-is)
 sort.isnt (see --sort-isnt)
 sort.max (see --sort-max)
 sort.min (see --sort-min)
 sort.not_contains (see --sort-not-contains)
 sort.not_in (see --sort-not-in)
 sort.xmax (see --sort-xmax)
 sort.xmin (see --sort-xmin)
 with_field_names (see --with-field-names)
 wordlist (see --wordlist)
 wordlist.contains (see --wordlist-contains)
 wordlist.in (see --wordlist-in)
 wordlist.is (see --wordlist-is)
 wordlist.isnt (see --wordlist-isnt)
 wordlist.max (see --wordlist-max)
 wordlist.min (see --wordlist-min)
 wordlist.not_contains (see --wordlist-not-contains)
 wordlist.not_in (see --wordlist-not-in)
 wordlist.xmax (see --wordlist-xmax)
 wordlist.xmin (see --wordlist-xmin)

=head1 ENVIRONMENT

 view all matches for this distribution


App-Wx-PodEditor

 view release on metacpan or  search on metacpan

t/boilerplate.t  view on Meta::CPAN


use strict;
use warnings;
use Test::More tests => 3;

sub not_in_file_ok {
    my ($filename, %regex) = @_;
    open my $fh, "<", $filename
        or die "couldn't open $filename for reading: $!";

    my %violated;

t/boilerplate.t  view on Meta::CPAN

    } else {
        pass("$filename contains no boilerplate text");
    }
}

not_in_file_ok(README =>
    "The README is used..."       => qr/The README is used/,
    "'version information here'"  => qr/to provide version information/,
);

not_in_file_ok(Changes =>
    "placeholder date/time"       => qr(Date/time)
);

sub module_boilerplate_ok {
    my ($module) = @_;
    not_in_file_ok($module =>
        'the great new $MODULENAME'   => qr/ - The great new /,
        'boilerplate description'     => qr/Quick summary of what the module/,
        'stub function definition'    => qr/function[12]/,
    );
}

 view all matches for this distribution


App-YoutubeDlIf

 view release on metacpan or  search on metacpan

lib/App/YoutubeDlIf.pm  view on Meta::CPAN

                "--log-file or put the log file in one of: ".
                (join ", ", @paths) unless $path;
            $path;
        },
    },
    if_duration_not_shorter_than => {
        #schema => 'duration*', # XXX duration coercer parses 01:00 as 1 hour 0 minutes instead of 1 minute 0 seconds
        schema => 'str*',
        tags => ['category:filtering'],
    },
    if_duration_not_longer_than => {
        #schema => 'duration*',
        schema => 'str*',
        tags => ['category:filtering'],
    },
    restart_if_no_output_after => {
        schema => 'duration*',
        tags => ['category:restart'],
    },
);

our %arg_if_not_yet = (
    if_not_yet => {
        summary => 'If set, only download videos that are not yet downloaded',
        schema => 'bool',
        description => <<'_',

When set to true, youtube-dl-if will first extract downloaded video ID's from

lib/App/YoutubeDlIf.pm  view on Meta::CPAN

This is a wrapper for **youtube-dl**.

_
    args => {
        %args_common,
        %arg_if_not_yet,
    },
    args_rels => {
        #dep_any => [log_file => ['if_not_yet']], # XXX currently will fail if if_not_yet not specified because of the log_file's default
    },
    deps => {
        prog => 'youtube-dl',
    },
};

lib/App/YoutubeDlIf.pm  view on Meta::CPAN

            last FILTER if $arg =~ /\A--?\w+/ && $arg !~ $re_video_id;

            my $video_id = YouTube::Util::extract_youtube_video_id($arg);
            if ($video_id) {
                log_trace "Argument %s has video ID %s", $arg, $video_id;
                if ($args{if_not_yet}) {
                    if (my $filename = _search_id_in_log_file($video_id, $args{log_file})) {
                        log_info "Argument %s (video ID %s) has been downloaded (%s), skipped", $arg, $video_id, $filename;
                        next ARG;
                    } else {
                        log_trace "Argument %s (video ID %s) is not in downloaded list", $arg, $video_id;
                    }
                }
            }
            if (defined $args{if_duration_not_shorter_than} || defined $args{if_duration_not_longer_than}) {
                my $min_secs = _dur2sec($args{if_duration_not_shorter_than});
                my $max_secs = _dur2sec($args{if_duration_not_longer_than});
                my $video_dur = readpipe({log=>1, die=>1}, "youtube-dl --no-playlist --get-duration -- '$arg' 2>/dev/null");
                my $video_secs = _dur2sec($video_dur);
                if (defined $min_secs && $video_secs < $min_secs) {
                    log_info "Argument %s (video ID %s, duration %s) is too short (min %s), skipped", $arg, $video_id, $video_dur, $args{if_duration_not_shorter_than};
                    next ARG;
                }
                if (defined $max_secs && $video_secs > $max_secs) {
                    log_info "Argument %s (video ID %s, duration %s) is too long (min %s), skipped", $arg, $video_id, $video_dur, $args{if_duration_not_longer_than};
                    next ARG;
                }
            }
        } # FILTER
        push @argv_for_youtube_dl, $arg;

lib/App/YoutubeDlIf.pm  view on Meta::CPAN

        system({log=>1, die=>1}, "youtube-dl", @argv_for_youtube_dl);
    }
    [200];
}

$SPEC{youtube_dl_if_not_yet} = {
    v => 1.1,
    summary => 'Download videos using youtube-dl if not already downloaded',
    description => <<'_',

This is a shortcut for:

lib/App/YoutubeDlIf.pm  view on Meta::CPAN

    },
    deps => {
        prog => 'youtube-dl',
    },
};
sub youtube_dl_if_not_yet {
    my %args = @_;
    youtube_dl_if(if_not_yet=>1, %args);
}

1;
# ABSTRACT: Download videos using youtube-dl with extra selection/filtering

lib/App/YoutubeDlIf.pm  view on Meta::CPAN


Arguments ('*' denotes required arguments):

=over 4

=item * B<if_duration_not_longer_than> => I<str>

=item * B<if_duration_not_shorter_than> => I<str>

=item * B<if_not_yet> => I<bool>

If set, only download videos that are not yet downloaded.

When set to true, youtube-dl-if will first extract downloaded video ID's from
filenames or URL's or video ID's listed in a text file (specified via

lib/App/YoutubeDlIf.pm  view on Meta::CPAN


Return value:  (any)



=head2 youtube_dl_if_not_yet

Usage:

 youtube_dl_if_not_yet(%args) -> [status, msg, payload, meta]

Download videos using youtube-dl if not already downloaded.

This is a shortcut for:

lib/App/YoutubeDlIf.pm  view on Meta::CPAN


Arguments ('*' denotes required arguments):

=over 4

=item * B<if_duration_not_longer_than> => I<str>

=item * B<if_duration_not_shorter_than> => I<str>

=item * B<log_file> => I<str> (default: "/home/u1/notes/download-logs.org")

File that contains list of download filenames.

 view all matches for this distribution


App-YoutubeDlIfNotYet

 view release on metacpan or  search on metacpan

lib/App/YoutubeDlIfNotYet.pm  view on Meta::CPAN

    };

    $cache->{$id};
}

$SPEC{youtube_dl_if_not_yet} = {
    v => 1.1,
    summary => '(DEPRECATED) Download videos using youtube-dl only if videos have not been donwnloaded yet',
    description => <<'_',

This is a wrapper for **youtube-dl**; it tries to extract downloaded video ID's

lib/App/YoutubeDlIfNotYet.pm  view on Meta::CPAN

    },
    deps => {
        prog => 'youtube-dl',
    },
};
sub youtube_dl_if_not_yet {
    my %args = @_;

    my @argv_for_youtube_dl;
    for my $arg (@{$args{urls_or_ids}}) {
        my $video_id = YouTube::Util::extract_youtube_video_id($arg);

lib/App/YoutubeDlIfNotYet.pm  view on Meta::CPAN

=head1 DESCRIPTION

=head1 FUNCTIONS


=head2 youtube_dl_if_not_yet

Usage:

 youtube_dl_if_not_yet(%args) -> [status, msg, payload, meta]

(DEPRECATED) Download videos using youtube-dl only if videos have not been donwnloaded yet.

This is a wrapper for B<youtube-dl>; it tries to extract downloaded video ID's
from filenames or URL's or video ID's listed in a text file, e.g.:

 view all matches for this distribution


App-ZodiacUtils

 view release on metacpan or  search on metacpan

lib/App/ZodiacUtils/Table.pm  view on Meta::CPAN


=item * B<earthly_branch.min> => I<str>

Only return records where the 'earthly_branch' field is greater than or equal to specified value.

=item * B<earthly_branch.not_contains> => I<str>

Only return records where the 'earthly_branch' field does not contain specified text.

=item * B<earthly_branch.not_in> => I<array[str]>

Only return records where the 'earthly_branch' field is not in the specified values.

=item * B<earthly_branch.xmax> => I<str>

lib/App/ZodiacUtils/Table.pm  view on Meta::CPAN


=item * B<element.min> => I<str>

Only return records where the 'element' field is greater than or equal to specified value.

=item * B<element.not_contains> => I<str>

Only return records where the 'element' field does not contain specified text.

=item * B<element.not_in> => I<array[str]>

Only return records where the 'element' field is not in the specified values.

=item * B<element.xmax> => I<str>

lib/App/ZodiacUtils/Table.pm  view on Meta::CPAN


=item * B<en_animal.min> => I<str>

Only return records where the 'en_animal' field is greater than or equal to specified value.

=item * B<en_animal.not_contains> => I<str>

Only return records where the 'en_animal' field does not contain specified text.

=item * B<en_animal.not_in> => I<array[str]>

Only return records where the 'en_animal' field is not in the specified values.

=item * B<en_animal.xmax> => I<str>

lib/App/ZodiacUtils/Table.pm  view on Meta::CPAN


=item * B<end_date.min> => I<date>

Only return records where the 'end_date' field is greater than or equal to specified value.

=item * B<end_date.not_in> => I<array[date]>

Only return records where the 'end_date' field is not in the specified values.

=item * B<end_date.xmax> => I<date>

lib/App/ZodiacUtils/Table.pm  view on Meta::CPAN


=item * B<heavenly_stem.min> => I<str>

Only return records where the 'heavenly_stem' field is greater than or equal to specified value.

=item * B<heavenly_stem.not_contains> => I<str>

Only return records where the 'heavenly_stem' field does not contain specified text.

=item * B<heavenly_stem.not_in> => I<array[str]>

Only return records where the 'heavenly_stem' field is not in the specified values.

=item * B<heavenly_stem.xmax> => I<str>

lib/App/ZodiacUtils/Table.pm  view on Meta::CPAN


=item * B<start_date.min> => I<date>

Only return records where the 'start_date' field is greater than or equal to specified value.

=item * B<start_date.not_in> => I<array[date]>

Only return records where the 'start_date' field is not in the specified values.

=item * B<start_date.xmax> => I<date>

lib/App/ZodiacUtils/Table.pm  view on Meta::CPAN


=item * B<yin_yang.min> => I<str>

Only return records where the 'yin_yang' field is greater than or equal to specified value.

=item * B<yin_yang.not_contains> => I<str>

Only return records where the 'yin_yang' field does not contain specified text.

=item * B<yin_yang.not_in> => I<array[str]>

Only return records where the 'yin_yang' field is not in the specified values.

=item * B<yin_yang.xmax> => I<str>

lib/App/ZodiacUtils/Table.pm  view on Meta::CPAN


=item * B<zh_animal.min> => I<str>

Only return records where the 'zh_animal' field is greater than or equal to specified value.

=item * B<zh_animal.not_contains> => I<str>

Only return records where the 'zh_animal' field does not contain specified text.

=item * B<zh_animal.not_in> => I<array[str]>

Only return records where the 'zh_animal' field is not in the specified values.

=item * B<zh_animal.xmax> => I<str>

 view all matches for this distribution


App-ZofCMS

 view release on metacpan or  search on metacpan

lib/App/ZofCMS/Plugin/FormChecker.pm  view on Meta::CPAN

    if ( $rule->{must_match} ) {
        return $self->_fail( $name, 'must_match_error', $rule )
            if $value !~ /$rule->{must_match}/;
    }

    if ( $rule->{must_not_match} ) {
        return $self->_fail( $name, 'must_not_match_error', $rule )
            if $value =~ /$rule->{must_not_match}/;
    }

    if ( $rule->{code} ) {
        return $self->_fail( $name, 'code_error', $rule )
            unless $rule->{code}->( $value, map $self->$_, qw/template query config/ );

lib/App/ZofCMS/Plugin/FormChecker.pm  view on Meta::CPAN

        num_error         => "Parameter $name must contain digits only",
        min_error         => "Parameter $name must be at least $rule->{min} characters long",
        max_error         => "Parameter $name cannot be longer than $rule->{max} characters",
        code_error        => "Parameter $name contains incorrect data",
        must_match_error  => "Parameter $name contains incorrect data",
        must_not_match_error => "Parameter $name contains incorrect data",
        param_error          => "Parameter $name does not match parameter $rule->{param}",
        either_or_error   => "Parameter $name must contain data if other parameters are not set",
        valid_values_error
            => "Parameter $name must be " . do {
                    my $last = pop @{ $rule->{valid_values} || [''] };

lib/App/ZofCMS/Plugin/FormChecker.pm  view on Meta::CPAN

            param3 => [ qw/optional num/ ],
            param4 => {
                optional        => 1,
                select          => 1,
                must_match      => qr/foo|bar/,
                must_not_match  => qr/foos/,
                must_match_error => 'Param4 must contain either foo or bar but not foos',
                param           => 'param2',
            },
            param5 => {
                valid_values        => [ qw/foo bar baz/ ],

lib/App/ZofCMS/Plugin/FormChecker.pm  view on Meta::CPAN

            param3 => [ qw/optional num/ ],
            param4 => {
                optional        => 1,
                select          => 1,
                must_match      => qr/foo|bar/,
                must_not_match  => qr/foos/,
                must_match_error => 'Param4 must contain either foo or bar but not foos',
            },
            param5 => {
                valid_values        => [ qw/foo bar baz/ ],
                valid_values_error  => 'Param5 must be foo, bar or baz',

lib/App/ZofCMS/Plugin/FormChecker.pm  view on Meta::CPAN

            param3 => [ qw/optional num/ ],
            param4 => {
                optional        => 1,
                select          => 1,
                must_match      => qr/foo|bar/,
                must_not_match  => qr/foos/,
                must_match_error => 'Param4 must contain either foo or bar but not foos',
            },
            param5 => {
                valid_values        => [ qw/foo bar baz/ ],
                valid_values_error  => 'Param5 must be foo, bar or baz',

lib/App/ZofCMS/Plugin/FormChecker.pm  view on Meta::CPAN

            name            => 'Parameter', # the name of this param to use in error messages
            num             => 1, # value must be numbers-only
            optional        => 1, # parameter is optional
            either_or       => [ qw/foo bar baz/ ], # param or foo or bar or baz must be set
            must_match      => qr/foo/, # value must match given regex
            must_not_match  => qr/bar/, # value must NOT match the given regex
            max             => 20, # value must not exceed 20 characters in length
            min             => 3,  # value must be more than 3 characters in length
            valid_values    => [ qw/foo bar baz/ ], # value must be one from the given list
            code            => sub { time() %2 }, # return from the sub determines pass/fail
            select          => 1, # flag for "filling", see no_fill key above
            param           => 'param1',
            num_error       => 'Numbers only!', # custom error if num rule failed
            mandatory_error => '', # same for if parameter is missing and not optional.
            must_match_error => '', # same for must_match rule
            must_not_match_error => '', # same for must_not_match_rule
            max_error            => '', # same for max rule
            min_error            => '', # same for min rule
            code_error           => '', # same for code rule
            either_or_error      => '', # same for either_or rule
            valid_values_error   => '', # same for valid_values rule

lib/App/ZofCMS/Plugin/FormChecker.pm  view on Meta::CPAN


    must_match => qr/foo/,

Takes a regex (C<qr//>) as a value. The query parameter's value must match this regex.

=head4 C<must_not_match>

    must_not_match => qr/bar/,

Takes a regex (C<qr//>) as a value. The query parameter's value must B<NOT> match this regex.

=head4 C<max>

lib/App/ZofCMS/Plugin/FormChecker.pm  view on Meta::CPAN

    must_match_error => 'Must match me!',

This is the error for C<must_match> rule. B<Defaults to:>
C<Parameter $name contains incorrect data>

=head4 C<must_not_match_error>

    must_not_match_error => 'Cannot has me!',

This is the error for C<must_not_match> rule. B<Defaults to:>
C<Parameter $name contains incorrect data>

=head4 C<max_error>

    max_error => 'Too long!',

 view all matches for this distribution


( run in 0.474 second using v1.01-cache-2.11-cpan-cc502c75498 )