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


App-GitFind

 view release on metacpan or  search on metacpan

lib/App/GitFind/Actions.pm  view on Meta::CPAN

# Special validators for ok, okdir, exec, and execdir.
# Validators return undefined if validation passes, and an error message
# otherwise.  Validators take the command and the located parameters
# in @_.

sub _validate_exec {
    return "need at least a command name" unless $#_>1;
    if($_[$#_] eq '+') {
        return "need a {}" unless grep { $_ eq '{}' } @_;
        return "{} can't be the first argument to $_[0]" if $_[1] eq '{}';
    }
    return undef;
}

sub _validate_ok {
    return "need at least a command name" unless $#_>1;
    return undef;
}

# }}}1

lib/App/GitFind/Actions.pm  view on Meta::CPAN


# Inflate %ARGS.  Arg is the package providing the actions; no return.
sub _inflate {
    my $package = $_[0];
    # Hook the validators into %ARGS
    $ARGS{exec}->{validator} = \&_validate_exec;
    $ARGS{execdir}->{validator} = $ARGS{exec}->{validator};
    $ARGS{ok}->{validator} = \&_validate_ok;
    $ARGS{okdir}->{validator} = $ARGS{ok}->{validator};

    # Hook the actions into %ARGS
    while (my ($key, $hrValue) = each %ARGS)  {
        my $fn = $package->can("do_$key");

 view all matches for this distribution


App-GitHooks-Plugin-PreventTrailingWhitespace

 view release on metacpan or  search on metacpan

LICENSE  view on Meta::CPAN

    License to anyone who comes into possession of a copy.  This
    License will therefore apply, along with any applicable section 7
    additional terms, to the whole of the work, and all its parts,
    regardless of how they are packaged.  This License gives no
    permission to license the work in any other way, but it does not
    invalidate such permission if you have separately received it.

    d) If the work has interactive user interfaces, each must display
    Appropriate Legal Notices; however, if the Program has interactive
    interfaces that do not display Appropriate Legal Notices, your
    work need not make them do so.

 view all matches for this distribution


App-GitHooks-Plugin-RubyCompile

 view release on metacpan or  search on metacpan

LICENSE  view on Meta::CPAN

    License to anyone who comes into possession of a copy.  This
    License will therefore apply, along with any applicable section 7
    additional terms, to the whole of the work, and all its parts,
    regardless of how they are packaged.  This License gives no
    permission to license the work in any other way, but it does not
    invalidate such permission if you have separately received it.

    d) If the work has interactive user interfaces, each must display
    Appropriate Legal Notices; however, if the Program has interactive
    interfaces that do not display Appropriate Legal Notices, your
    work need not make them do so.

 view all matches for this distribution


App-GitHooks-Plugin-ValidateChangelogFormat

 view release on metacpan or  search on metacpan

lib/App/GitHooks/Plugin/ValidateChangelogFormat.pm  view on Meta::CPAN


L<https://github.com/guillaumeaubert/App-GitHooks-Plugin-ValidateChangelogFormat/issues>

=item * AnnoCPAN: Annotated CPAN documentation

l<http://annocpan.org/dist/app-githooks-plugin-validatechangelogformat>

=item * CPAN Ratings

L<http://cpanratings.perl.org/d/app-githooks-plugin-validatechangelogformat>

=item * MetaCPAN

L<https://metacpan.org/release/App-GitHooks-Plugin-ValidateChangelogFormat>

 view all matches for this distribution


App-GitHooks-Plugin-ValidatePODFormat

 view release on metacpan or  search on metacpan

lib/App/GitHooks/Plugin/ValidatePODFormat.pm  view on Meta::CPAN


L<https://github.com/guillaumeaubert/App-GitHooks-Plugin-ValidatePODFormat/issues>

=item * AnnoCPAN: Annotated CPAN documentation

L<http://annocpan.org/dist/app-githooks-plugin-validatepodformat>

=item * CPAN Ratings

L<http://cpanratings.perl.org/d/app-githooks-plugin-validatepodformat>

=item * MetaCPAN

L<https://metacpan.org/release/App-GitHooks-Plugin-ValidatePODFormat>

 view all matches for this distribution


App-GitHub

 view release on metacpan or  search on metacpan

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

}

sub set_repo {
    my ( $self, $repo ) = @_;

    # validate
    unless ( $repo =~ $self->repo_regexp ) {
        $self->print("Wrong repo args ($repo), eg 'fayland perl-app-github'");
        return;
    }
    my ( $owner, $name ) = ( $repo =~ $self->repo_regexp );

 view all matches for this distribution


App-GitHubUtils

 view release on metacpan or  search on metacpan

script/git-clone-from-github  view on Meta::CPAN


You can also put configuration for multiple programs inside a single file, and use filter C<program=NAME> in section names, e.g. C<[program=NAME ...]> or C<[SOMESECTION program=NAME]>. The section will then only be used when the reading program match...

You can also filter a section by environment variable using the filter C<env=CONDITION> in section names. For example if you only want a section to be read if a certain environment variable is true: C<[env=SOMEVAR ...]> or C<[SOMESECTION env=SOMEVAR ...

To load and configure plugins, you can use either the C<-plugins> parameter (e.g. C<< -plugins=DumpArgs >> or C<< -plugins=DumpArgs@before_validate_args >>), or use the C<[plugin=NAME ...]> sections, for example:

 [plugin=DumpArgs]
 -event=before_validate_args
 -prio=99
 
 [plugin=Foo]
 -event=after_validate_args
 arg1=val1
 arg2=val2

 

which is equivalent to setting C<< -plugins=-DumpArgs@before_validate_args@99,-Foo@after_validate_args,arg1,val1,arg2,val2 >>.

List of available configuration parameters:

 format (see --format)
 log_level (see --log-level)

 view all matches for this distribution


App-GitUtils

 view release on metacpan or  search on metacpan

script/gu  view on Meta::CPAN


You can also put configuration for multiple programs inside a single file, and use filter C<program=NAME> in section names, e.g. C<[program=NAME ...]> or C<[SOMESECTION program=NAME]>. The section will then only be used when the reading program match...

You can also filter a section by environment variable using the filter C<env=CONDITION> in section names. For example if you only want a section to be read if a certain environment variable is true: C<[env=SOMEVAR ...]> or C<[SOMESECTION env=SOMEVAR ...

To load and configure plugins, you can use either the C<-plugins> parameter (e.g. C<< -plugins=DumpArgs >> or C<< -plugins=DumpArgs@before_validate_args >>), or use the C<[plugin=NAME ...]> sections, for example:

 [plugin=DumpArgs]
 -event=before_validate_args
 -prio=99
 
 [plugin=Foo]
 -event=after_validate_args
 arg1=val1
 arg2=val2

 

which is equivalent to setting C<< -plugins=-DumpArgs@before_validate_args@99,-Foo@after_validate_args,arg1,val1,arg2,val2 >>.

List of available configuration parameters:

=head2 Common for all subcommands

 view all matches for this distribution


App-Gitc

 view release on metacpan or  search on metacpan

lib/App/Gitc/Its/Eventum.pm  view on Meta::CPAN

    return "Skipping Eventum changes, as requested by GITC_NO_EVENTUM\n"
        if $ENV{GITC_NO_EVENTUM};
    return "Skipping Eventum changes as configured for this project\n"
        if not project_config()->{'eventum_uri'};

    # validate the arguments
    my $command = $args->{command} || command_name();
    my ($from, $to) = $self->_states( $command, $args->{target} );
    my $message = $args->{message} or die "No eventum message";
    my $issue = exists $args->{issue} ? $args->{issue} :
                                        $self->get_issue(current_branch(), reload => 1);

 view all matches for this distribution


App-Glacier

 view release on metacpan or  search on metacpan

lib/App/Glacier/Command/Sync.pm  view on Meta::CPAN

    my ($self, $vault_name, %opts) = @_;

    my $dir = $self->directory($vault_name);
    my $job = new App::Glacier::Job::InventoryRetrieval(
	$self, $vault_name,
	invalidate => $opts{force});
    if ($job->is_completed) {
	my $res = $self->glacier->Get_job_output($vault_name, $job->id);
	if ($self->glacier->lasterr) {
	    if ($self->glacier->lasterr('code') == 404 && !$opts{force})  {
		if ($opts{restart}) {

 view all matches for this distribution


App-GnuCash-MembershipUtils

 view release on metacpan or  search on metacpan

lib/App/GnuCash/MembershipUtils.pm  view on Meta::CPAN

    get_config
    get_gnucash_filename
    max_length
    open_gnucash
    title_case
    validate_accounts_in_config
);

our %EXPORT_TAGS = (
    all    => [ @EXPORT_OK ],
    config => [ qw(
        get_config
        get_gnucash_filename
        validate_accounts_in_config
    )],
    db     => [ qw(
        db_accounts_to_hash
        get_all_members
        open_gnucash

lib/App/GnuCash/MembershipUtils.pm  view on Meta::CPAN

    my @errors;

    # Now we have a hash, let's make sure it has what we need
    if (exists($config->{MembershipTypes})) {
        if (exists($config->{MembershipTypes}{default})) {
            my $error = _validate_membership_type_config($config->{MembershipTypes}{default}, 1);
            if ($error) {
                push(@errors, "The 'MembershipTypes.default' section $error"); 
            }
            if (my $others = $config->{MembershipTypes}{others}) {
                 my $idx;
                 for my $type (@$others) {
                    $idx++;
                    if (my $error = _validate_membership_type_config($type)) {
                        push(@errors, "The 'MembershipTypes.others' entry $idx $error"); 
                    }
                 }
            }
        } else {

lib/App/GnuCash/MembershipUtils.pm  view on Meta::CPAN

    }

    return \%accounts;
}

=head2 validate_accounts_in_config($args)

    my ($errors, $warnings) = validate_accounts_in_config($args);
    warn $warnings if ($warnings);
    die $errors if ($errors);

Accepts a HASHREF of C<$args> whose keys are as follows:

lib/App/GnuCash/MembershipUtils.pm  view on Meta::CPAN

Returns C<$errors> which is a string indicating fatal errors, and
C<$warnings> which is a non-fatal error.

=cut

sub validate_accounts_in_config {
    my $args   = shift;
    my $schema = delete $args->{schema};
    my $config = delete $args->{config};
    my $debug  = delete $args->{debug} // 0;

lib/App/GnuCash/MembershipUtils.pm  view on Meta::CPAN

    } else {
        push(@errors, "Missing 'GnuCash' section");
    }
    if (exists($config->{MembershipTypes})) {
        if (exists($config->{MembershipTypes}{default})) {
            my $error = _validate_membership_type_config($config->{MembershipTypes}{default}, 1);
            if ($error) {
                push(@errors, "The 'MembershipTypes.default' section $error"); 
            } else {
                my $config_account = $config->{MembershipTypes}{default}{account};
                if (my $gc_account = $accounts->{$config_account}) {

lib/App/GnuCash/MembershipUtils.pm  view on Meta::CPAN

            $section,
        )
    );
}

sub _validate_membership_type_config {
    my $config        = shift // {};
    my $default_type  = shift // 0;
    my @required_keys = qw( account amount name );
    push(@required_keys, qw( match )) unless $default_type;
    my @missing;

 view all matches for this distribution


App-Gnuget

 view release on metacpan or  search on metacpan

LICENSE  view on Meta::CPAN

    License to anyone who comes into possession of a copy.  This
    License will therefore apply, along with any applicable section 7
    additional terms, to the whole of the work, and all its parts,
    regardless of how they are packaged.  This License gives no
    permission to license the work in any other way, but it does not
    invalidate such permission if you have separately received it.

    d) If the work has interactive user interfaces, each must display
    Appropriate Legal Notices; however, if the Program has interactive
    interfaces that do not display Appropriate Legal Notices, your
    work need not make them do so.

 view all matches for this distribution


App-GoogleSearchUtils

 view release on metacpan or  search on metacpan

script/google-search  view on Meta::CPAN


You can also put configuration for multiple programs inside a single file, and use filter C<program=NAME> in section names, e.g. C<[program=NAME ...]> or C<[SOMESECTION program=NAME]>. The section will then only be used when the reading program match...

You can also filter a section by environment variable using the filter C<env=CONDITION> in section names. For example if you only want a section to be read if a certain environment variable is true: C<[env=SOMEVAR ...]> or C<[SOMESECTION env=SOMEVAR ...

To load and configure plugins, you can use either the C<-plugins> parameter (e.g. C<< -plugins=DumpArgs >> or C<< -plugins=DumpArgs@before_validate_args >>), or use the C<[plugin=NAME ...]> sections, for example:

 [plugin=DumpArgs]
 -event=before_validate_args
 -prio=99
 
 [plugin=Foo]
 -event=after_validate_args
 arg1=val1
 arg2=val2

 

which is equivalent to setting C<< -plugins=-DumpArgs@before_validate_args@99,-Foo@after_validate_args,arg1,val1,arg2,val2 >>.

List of available configuration parameters:

 action (see --action)
 append (see --append)

 view all matches for this distribution


App-Greple-subst

 view release on metacpan or  search on metacpan

share/jtca-katakana-guide-3.pl  view on Meta::CPAN

バニラ vanilla 3
バラエティー variety 1-1、1-2、3
バリア barrier 1-1例外
バリエーション variation 1-2、3、4-1
バリデーター validator 1-1、1-2、3
バリデート validate 1-2、3
バルブ valve 3
バー bar 1-1 
バージョン version 1-4、3
バージン virgin 3
バーティカル vertical 1-1、1-4、3、4-1例外

 view all matches for this distribution


App-Greple-xlate

 view release on metacpan or  search on metacpan

script/xlate  view on Meta::CPAN

=item B<-I> I<image>

Specify Docker image name.  If it begins with a colon (C<:>), it is
treated as a version of the default image.

Setting an empty string will invalidate any previous settings and use
the default image.

=begin comment

=item B<-J> I<directory>

 view all matches for this distribution


App-HTTP_Proxy_IMP

 view release on metacpan or  search on metacpan

examples/DelayRequest.pm  view on Meta::CPAN

	[ IMP_PASS,1,IMP_MAXOFFSET ],
    );
    return $self;
}

sub validate_cfg {
    my ($class,%cfg) = @_;
    delete $cfg{delay};
    return $class->SUPER::validate_cfg(%cfg);
}

sub data {
    my ($self,$dir,$data,$offset,$type) = @_;
    if ( $dir == 0                             # request

 view all matches for this distribution


App-HistHub

 view release on metacpan or  search on metacpan

inc/Module/Install/Metadata.pm  view on Meta::CPAN

		);
		while ( my ($pattern, $license, $osi) = splice(@phrases, 0, 3) ) {
			$pattern =~ s{\s+}{\\s+}g;
			if ( $license_text =~ /\b$pattern\b/i ) {
				if ( $osi and $license_text =~ /All rights reserved/i ) {
					print "WARNING: 'All rights reserved' in copyright may invalidate Open Source license.\n";
				}
				$self->license($license);
				return 1;
			}
		}

 view all matches for this distribution


App-HomeBank2Ledger

 view release on metacpan or  search on metacpan

lib/App/HomeBank2Ledger/Ledger.pm  view on Meta::CPAN

sub payees       { shift->{payees}       || [] }
sub tags         { shift->{tags}         || [] }
sub transactions { shift->{transactions} || [] }


# TODO - These should validate incoming data.

sub add_accounts {
    my $self = shift;
    push @{$self->{accounts}}, @_;
}

 view all matches for this distribution


App-IODCounterSimpleUtils

 view release on metacpan or  search on metacpan

script/dump-iod-counters  view on Meta::CPAN


You can also put configuration for multiple programs inside a single file, and use filter C<program=NAME> in section names, e.g. C<[program=NAME ...]> or C<[SOMESECTION program=NAME]>. The section will then only be used when the reading program match...

You can also filter a section by environment variable using the filter C<env=CONDITION> in section names. For example if you only want a section to be read if a certain environment variable is true: C<[env=SOMEVAR ...]> or C<[SOMESECTION env=SOMEVAR ...

To load and configure plugins, you can use either the C<-plugins> parameter (e.g. C<< -plugins=DumpArgs >> or C<< -plugins=DumpArgs@before_validate_args >>), or use the C<[plugin=NAME ...]> sections, for example:

 [plugin=DumpArgs]
 -event=before_validate_args
 -prio=99
 
 [plugin=Foo]
 -event=after_validate_args
 arg1=val1
 arg2=val2

 

which is equivalent to setting C<< -plugins=-DumpArgs@before_validate_args@99,-Foo@after_validate_args,arg1,val1,arg2,val2 >>.

List of available configuration parameters:

 format (see --format)
 naked_res (see --naked-res)

 view all matches for this distribution


App-ImageMagickUtils

 view release on metacpan or  search on metacpan

script/downsize-image  view on Meta::CPAN


You can also put configuration for multiple programs inside a single file, and use filter C<program=NAME> in section names, e.g. C<[program=NAME ...]> or C<[SOMESECTION program=NAME]>. The section will then only be used when the reading program match...

You can also filter a section by environment variable using the filter C<env=CONDITION> in section names. For example if you only want a section to be read if a certain environment variable is true: C<[env=SOMEVAR ...]> or C<[SOMESECTION env=SOMEVAR ...

To load and configure plugins, you can use either the C<-plugins> parameter (e.g. C<< -plugins=DumpArgs >> or C<< -plugins=DumpArgs@before_validate_args >>), or use the C<[plugin=NAME ...]> sections, for example:

 [plugin=DumpArgs]
 -event=before_validate_args
 -prio=99
 
 [plugin=Foo]
 -event=after_validate_args
 arg1=val1
 arg2=val2

 

which is equivalent to setting C<< -plugins=-DumpArgs@before_validate_args@99,-Foo@after_validate_args,arg1,val1,arg2,val2 >>.

List of available configuration parameters:

 delete_original (see --delete-original)
 downsize_to (see --downsize-to)

 view all matches for this distribution


App-IndonesianBankingUtils

 view release on metacpan or  search on metacpan

script/list-bca-branches  view on Meta::CPAN


You can also put configuration for multiple programs inside a single file, and use filter C<program=NAME> in section names, e.g. C<[program=NAME ...]> or C<[SOMESECTION program=NAME]>. The section will then only be used when the reading program match...

You can also filter a section by environment variable using the filter C<env=CONDITION> in section names. For example if you only want a section to be read if a certain environment variable is true: C<[env=SOMEVAR ...]> or C<[SOMESECTION env=SOMEVAR ...

To load and configure plugins, you can use either the C<-plugins> parameter (e.g. C<< -plugins=DumpArgs >> or C<< -plugins=DumpArgs@before_validate_args >>), or use the C<[plugin=NAME ...]> sections, for example:

 [plugin=DumpArgs]
 -event=before_validate_args
 -prio=99
 
 [plugin=Foo]
 -event=after_validate_args
 arg1=val1
 arg2=val2

 

which is equivalent to setting C<< -plugins=-DumpArgs@before_validate_args@99,-Foo@after_validate_args,arg1,val1,arg2,val2 >>.

List of available configuration parameters:

 city_code (see --city-code)
 city_code.contains (see --city-code-contains)

 view all matches for this distribution


App-IndonesianFinanceUtils

 view release on metacpan or  search on metacpan

script/convert-currency-using-bca  view on Meta::CPAN


You can also put configuration for multiple programs inside a single file, and use filter C<program=NAME> in section names, e.g. C<[program=NAME ...]> or C<[SOMESECTION program=NAME]>. The section will then only be used when the reading program match...

You can also filter a section by environment variable using the filter C<env=CONDITION> in section names. For example if you only want a section to be read if a certain environment variable is true: C<[env=SOMEVAR ...]> or C<[SOMESECTION env=SOMEVAR ...

To load and configure plugins, you can use either the C<-plugins> parameter (e.g. C<< -plugins=DumpArgs >> or C<< -plugins=DumpArgs@before_validate_args >>), or use the C<[plugin=NAME ...]> sections, for example:

 [plugin=DumpArgs]
 -event=before_validate_args
 -prio=99
 
 [plugin=Foo]
 -event=after_validate_args
 arg1=val1
 arg2=val2

 

which is equivalent to setting C<< -plugins=-DumpArgs@before_validate_args@99,-Foo@after_validate_args,arg1,val1,arg2,val2 >>.

List of available configuration parameters:

 format (see --format)
 from (see --from)

 view all matches for this distribution


App-IndonesianNumberUtils

 view release on metacpan or  search on metacpan

META.json  view on Meta::CPAN

            "name" : "GenPericmdScript parse-nkk",
            "version" : "0.425"
         },
         {
            "class" : "Dist::Zilla::Plugin::GenPericmdScript",
            "name" : "GenPericmdScript validate-nop-pbb",
            "version" : "0.425"
         },
         {
            "class" : "Dist::Zilla::Plugin::GenPericmdScript",
            "name" : "GenPericmdScript parse-npwp",

 view all matches for this distribution


App-Info

 view release on metacpan or  search on metacpan

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

handlers.

=item callback

Assuming a handler has collected a value for your unknown data point, it might
make sense to validate the value. For example, if you prompt the user for a
directory location, and the user enters one, it makes sense to ensure that the
directory actually exists. The C<callback> parameter allows you to do this. It
is a code reference that takes the new value or values as its arguments, and
returns true if the value is valid, and false if it is not. For the sake of
convenience, the first argument to the callback code reference is also stored
in C<$_> .This makes it easy to validate using functions or operators that,
er, operate on C<$_> by default, but still allows you to get more information
from C<@_> if necessary. For the directory example, a good callback might be
C<sub { -d }>. The C<callback> parameter code reference will be stored in the
C<callback> attribute of the App::Info::Request object passed to event
handlers.

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

App::Info::Request object passed to event handlers.

=item callback

Same as for C<unknown()>. Because the user can enter data to replace the
default value provided via the C<value> parameter, you might want to validate
it. Use this code reference to do so. The callback will be stored in the
C<callback> attribute of the App::Info::Request object passed to event
handlers.

=item error

Same as for C<unknown()>: an error message to display in the event that a
value entered by the user isn't validated by the C<callback> code reference.
This value will be stored in the C<error> attribute of the App::Info::Request
object passed to event handlers.

=back

 view all matches for this distribution


App-IniDiff-IniFile

 view release on metacpan or  search on metacpan

LICENSE  view on Meta::CPAN

    License to anyone who comes into possession of a copy.  This
    License will therefore apply, along with any applicable section 7
    additional terms, to the whole of the work, and all its parts,
    regardless of how they are packaged.  This License gives no
    permission to license the work in any other way, but it does not
    invalidate such permission if you have separately received it.

    d) If the work has interactive user interfaces, each must display
    Appropriate Legal Notices; however, if the Program has interactive
    interfaces that do not display Appropriate Legal Notices, your
    work need not make them do so.

 view all matches for this distribution


App-InvestSim

 view release on metacpan or  search on metacpan

lib/App/InvestSim/GUI.pm  view on Meta::CPAN

  Tkx::focus('.');
  map { $_->() } @all_refresh_actions;
  calculate_all();
}

# Callback called when one of our validated fields gets the focus.
# widget is the widget itself (the object, not the Tk path), $var is a scalar
# reference to the variable holding the un-decorated value. $right_justified is
# true if the field should be right justified when not edited.
# This replaces the beautified content of the entry, with the raw content for
# editing.
sub focus_in_field {
  my ($widget, $var, $right_justified) = @_;
  $widget->m_delete(0, 'end');
  $widget->m_insert(0, $$var);
  $widget->m_configure(-justify => 'left') if $right_justified;
  $widget->m_configure(-validate => 'key');
}

# Callback called when one of our validated fields lose the focus. Arguments are
# the same as for focus_in_field, with the addition of $refresh which is a method
# called to format the raw value into a better looking string.
# This replaces the raw content of the entry with the beautified text.
sub focus_out_field {
  my ($widget, $var, $right_justified, $refresh) = @_;
  $widget->m_configure(-validate => 'none');
  # Todo: check here that the widget is in a valid state before proceeding.
  $$var = $widget->m_get() =~ s/,/./r;
  $refresh->();
  $widget->m_configure(-justify => 'right') if $right_justified;
  calculate_all();

lib/App/InvestSim/GUI.pm  view on Meta::CPAN

# Receives a ttk_entry widget, a var reference and a field type (euro, percent,
# or year) and setup the entry so that it edits that variable with a beautified
# display corresponding to the type. $textvar can be undef or a scalar
# reference that gets the beautified content of the field.
sub setup_entry {
  my ($widget, $var, $format, $validate, $textvar) = @_;
  my $right_justified = (Tkx::SplitList($widget->m_configure('-justify')))[-1] eq 'right';
  my $refresh = sub {
    $widget->m_delete(0, 'end');
    $widget->m_insert(0, $format->($$var));
    $$textvar = $format->($$var) if $textvar;
  };
  push @all_refresh_actions, $refresh;
  $widget->g_bind("<FocusIn>", sub { focus_in_field($widget, $var, $right_justified) });
  $widget->g_bind("<FocusOut>", sub { focus_out_field($widget, $var, $right_justified, $refresh) });
  # The validation function will receive the new string and the event 'key' or
  # 'forced' (could be 'focusin' or 'focusout' but we don't validate on these
  # event).
  $widget->m_configure(-validate => 'none', -validatecommand => [ sub { $has_changes = 1; $validate->(@_) }, Tkx::Ev('%P', '%V')]);
}

my $currently_selected;
sub set_core_table_selected_state {
  my ($widget) = @_;

lib/App/InvestSim/GUI.pm  view on Meta::CPAN


# Add in the given frame in column 0 and 1 a label and an entry text box in the
# given row that is incremented ($row is a ref to a scalar).
sub add_input_entry {
  my ($frame, $row, $key, $text, $format, $tooltip) = @_;
  my (undef, $validate) = @{$values_config{$key}};
  my $var_ref = \$values{$key};
  $frame->new_ttk__label(-text => "${text} :")
    ->g_grid(-column => 0, -row => $$row, -sticky => "e", -padx => "0 2");
  my $e = $frame->new_ttk__entry(-width => ENTRY_WIDTH);
    $e->g_grid(-column => 1, -row => $$row++, -sticky => "we", -pady => 2);
  setup_entry($e, $var_ref, $format, $validate);
  if ($tooltip) {
    local $Text::Wrap::columns = 50;
    $e->g_tooltip__tooltip(Text::Wrap::fill('', '', $tooltip)); 
  }
}

lib/App/InvestSim/GUI.pm  view on Meta::CPAN

    $frame->new_ttk__label(-text => "Durée d'emprunt (années)")
      ->g_grid(-column => 0, -row => 0, -sticky => "e");
    $frame->new_ttk__label(-text => "Taux d'emprunt")
      ->g_grid(-column => 0, -row => 1, -sticky => "e");
    my $loan_durations = $values{loan_durations};
    my $validate_duration = $values_config{loan_durations}[1];
    my $loan_rates = $values{loan_rates};
    my $validate_rate = $values_config{loan_rates}[1];
    for my $i (0..NUM_LOAN_DURATION-1) {
      my $d = $frame->new_ttk__entry(-width => ENTRY_WIDTH);
      $d->g_grid(-column => $i + 1, -row => 0, -sticky => "we");
      setup_entry($d, \$loan_durations->[$i], \&format_year, $validate_duration, \$loan_duration_texts[$i]);
      my $r = $frame->new_ttk__entry(-width => ENTRY_WIDTH);
      $r->g_grid(-column => $i + 1, -row => 1, -sticky => "we");
      setup_entry($r, \$loan_rates->[$i], \&format_percent, $validate_rate);
    }
  }

  # Build the combo-box with the list of possible values, in its own frame.
  my @modes;

lib/App/InvestSim/GUI.pm  view on Meta::CPAN

    for my $i (0..NUM_LOAN_DURATION-1) {
      $frame->new_ttk__entry(-width => ENTRY_WIDTH, -textvariable => \$loan_duration_texts[$i], -state => 'readonly', -takefocus => 0)
        ->g_grid(-column => $i + 1, -row => 0, -sticky => "we");
    }
    my $loan_amounts = $values{loan_amounts};
    my $validate_amount = $values_config{loan_amounts}[1];
    for my $j (0..NUM_LOAN_AMOUNT-1) {
      my $w = $frame->new_ttk__entry(-width => ENTRY_WIDTH, -justify => 'right');
      $w->g_grid(-column => 0, -row => $j + 1, -sticky => "we");
      setup_entry($w, \$loan_amounts->[$j], \&format_euro, $validate_amount);
    }
    for my $i (0..NUM_LOAN_DURATION-1) {
      for my $j (0..NUM_LOAN_AMOUNT-1) {
        my $e = $frame->new_ttk__entry(-width => ENTRY_WIDTH, -textvariable => \$core_display_values[$i][$j],
                                       -state => 'readonly', -justify => 'right', -takefocus => 0,

 view all matches for this distribution


App-JESP

 view release on metacpan or  search on metacpan

lib/App/JESP/Cmd/CommandJESP.pm  view on Meta::CPAN


=cut

sub options{return ();}

=head2 validate_args

Do some stuff with validate args.

=cut

sub validate_args {
    my ( $self, $opts, $args ) = @_;
    unless( $opts->dsn() ){ die "Missing 'dsn' option. Run with -h\n"; }
    unless( $opts->home() ){ die "Missing 'home' option. Run with -h\n"; }

    # Time to build the JESP

lib/App/JESP/Cmd/CommandJESP.pm  view on Meta::CPAN

    $log->debug("App::JESP instance built");

    # Inject __jesp in myself.
    # Yes this is a bit dirty, but it works.
    $self->{__jesp} = $jesp;
    $self->validate( $opts, $args );
}

=head2 validate

Override that in subclasses to validate further.

=cut

sub validate{};

=head2 jesp

Returns the current JESP instance.

 view all matches for this distribution


App-JobLog

 view release on metacpan or  search on metacpan

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

don't need truly random access to the whole log but an interval -- all the lines from one point to another.
We only need a slightly glorified log. A database is overkill. Finally, as soon as we maintain our data in
a database it becomes an opaque blob and our editing interface becomes much more complicated to
write, use, and maintain. We need to write a shell, GUI, or ncurses interface and figure out how to provide
the editor with search facilities, the context in which she is making edits, and perhaps an undo/redo stack.
If it's a text file we just pop up an editor and validate the log on close. So I stuck with a log.

=head1 ACKNOWLEDGEMENTS

Thanks to Ricardo Signes for the redoubtable L<App::Cmd> which wires this all together, Dave Rolsky for L<DateTime>,
which does all the calendar math, and Ingy dE<ouml>t Net for L<IO::All>, which, via L<Tie::File> (thanks, Mark Jason

 view all matches for this distribution


App-Jup

 view release on metacpan or  search on metacpan

lib/App/Jup/Command/debug.pm  view on Meta::CPAN


sub abstract {'Run jup debugger'}

sub usage_desc { '%c %o' }

sub validate_args {
    my ($self, $opt, $args) = @_;
    $self->usage_error('jup debug') unless $opt->{debug};
}

sub execute {

 view all matches for this distribution


App-Kritika

 view release on metacpan or  search on metacpan

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

      unless defined $self->{revision};

    return $self;
}

sub validate {
    my $self = shift;
    my (@paths) = @_;

    my $files = [];

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

    }

    my $ua = $self->{ua};

    my $response = $ua->post(
        "$self->{base_url}/validate",
        {
            headers => {
                Authorization => 'Token ' . $self->{token},
                Accept        => 'application/json',
                'X-Version'   => $VERSION,

 view all matches for this distribution


( run in 1.476 second using v1.01-cache-2.11-cpan-beeb90c9504 )