view release on metacpan or search on metacpan
lib/App/GUI/Notepad.pm view on Meta::CPAN
with this module, and can be launched by simply typing the following from
the command line.
perlpad
When launched, the application looks and acts like a very simple rendition of
Notepad from Windows. Currently you can create new files and save files and
perform the usual edit functions (Undo, Redo, Cut, Copy and Paste)
( It's early days yet for this application ).
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/Games/Keno.pm view on Meta::CPAN
use Moose;
use Types::Standard qw(Int ArrayRef HashRef Bool);
use Carp qw(croak carp);
use List::Compare qw (get_intersection);
use List::Util qw(any uniq);
use Scalar::Util qw(looks_like_number);
# ABSTRACT: Plays Keno
=head1 NAME
lib/App/Games/Keno.pm view on Meta::CPAN
warn "'" . $self->verbose . "' is not a valid verbose level, using '0'";
$self->verbose(0);
}
if ( defined $self->spots ) {
if ( any { !looks_like_number($_) } @{ $self->spots } ) {
croak "One of the spots you chose doesn't look like a number.";
}
if ( any { $_ < 1 || $_ > 80 } @{ $self->spots } ) {
croak "You chose a spot that is out of the 1 to 80 range";
}
view all matches for this distribution
view release on metacpan or search on metacpan
script/_genpass-id view on Meta::CPAN
#
#use 5.010001;
#use strict;
#use warnings;
#
#use Scalar::Util qw(looks_like_number blessed reftype refaddr);
#
#require Exporter;
#our @ISA = qw(Exporter);
#our @EXPORT = qw(dd dmp);
#
script/_genpass-id view on Meta::CPAN
#
# my $ref = ref($val);
# if ($ref eq '') {
# if (!defined($val)) {
# return "undef";
# } elsif (looks_like_number($val) && !$OPT_STRINGIFY_NUMBERS &&
# $val eq $val+0 &&
# $val !~ /\A-?(?:inf(?:inity)?|nan)\z/i
# ) {
# return $val;
# } else {
script/_genpass-id view on Meta::CPAN
# for (@_) {
# my $ref = ref($_);
# if ($ref eq 'ARRAY') { $prev = $_ }
# elsif ($ref eq 'HASH') { $meta = $_ }
# elsif (!$ref) {
# if (Scalar::Util::looks_like_number($_)) {
# $status = $_;
# } else {
# $msg = $_;
# }
# }
script/_genpass-id view on Meta::CPAN
#}
#
#sub is_valid_plain {
# my $self = shift;
# return 0 unless length $_[0];
# return 0 if $self->quote_numeric_strings and Scalar::Util::looks_like_number($_[0]);
# return 0 if $_[0] =~ /^[\s\{\[\~\`\'\"\!\@\#\>\|\%\&\?\*\^]/;
# return 0 if $_[0] =~ /[\{\[\]\},]/;
# return 0 if $_[0] =~ /[:\-\?]\s/;
# return 0 if $_[0] =~ /\s#/;
# return 0 if $_[0] =~ /\:(\s|$)/;
view all matches for this distribution
view release on metacpan or search on metacpan
script/_genpass-wordlist view on Meta::CPAN
#
#use 5.010001;
#use strict;
#use warnings;
#
#use Scalar::Util qw(looks_like_number blessed reftype refaddr);
#
#require Exporter;
#our @ISA = qw(Exporter);
#our @EXPORT = qw(dd dmp);
#
script/_genpass-wordlist view on Meta::CPAN
#
# my $ref = ref($val);
# if ($ref eq '') {
# if (!defined($val)) {
# return "undef";
# } elsif (looks_like_number($val) && !$OPT_STRINGIFY_NUMBERS &&
# $val eq $val+0 &&
# $val !~ /\A-?(?:inf(?:inity)?|nan)\z/i
# ) {
# return $val;
# } else {
script/_genpass-wordlist view on Meta::CPAN
# for (@_) {
# my $ref = ref($_);
# if ($ref eq 'ARRAY') { $prev = $_ }
# elsif ($ref eq 'HASH') { $meta = $_ }
# elsif (!$ref) {
# if (Scalar::Util::looks_like_number($_)) {
# $status = $_;
# } else {
# $msg = $_;
# }
# }
script/_genpass-wordlist view on Meta::CPAN
#}
#
#sub is_valid_plain {
# my $self = shift;
# return 0 unless length $_[0];
# return 0 if $self->quote_numeric_strings and Scalar::Util::looks_like_number($_[0]);
# return 0 if $_[0] =~ /^[\s\{\[\~\`\'\"\!\@\#\>\|\%\&\?\*\^]/;
# return 0 if $_[0] =~ /[\{\[\]\},]/;
# return 0 if $_[0] =~ /[:\-\?]\s/;
# return 0 if $_[0] =~ /\s#/;
# return 0 if $_[0] =~ /\:(\s|$)/;
view all matches for this distribution
view release on metacpan or search on metacpan
bin/genpass view on Meta::CPAN
B<genpass> also supports configuration files, so you don't have to remember all
your favorite options and insert them each time. First it tries to read a
C<.genpass.yaml> in your home folder (works with Linux, BSD, MacOS, Windows and
anything L<File::HomeDir> supports) and if that doesn't exist (or is simply
unreadable), it looks for a global Unix-style conf named C</etc/genpass.yaml>.
You will read below how you can specifically ask to read a completely different
file instead of the default ones mentioned above.
Read below for more options and examples.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/Getconf.pm view on Meta::CPAN
# long option, possible parameter in next argument {{{
$option_name = $1;
$option = $args[$i];
# there's no option of exactly the same name, but the --option looks
# like a negation of Boolean
if (!$self->has_option($option_name) && $option_name =~ /^no-/) {
my $negated_name = substr $option_name, 3;
# there is an option without "--no-" prefix and that option is
lib/App/Getconf.pm view on Meta::CPAN
Option specifying a path in local filesystem.
=cut
sub opt_path() {
# TODO: some checks on how this looks like
# * existing file
# * existing directory
# * non-existing file (directory exists)
# * Maasai?
return opt { type => 'string' };
view all matches for this distribution
view release on metacpan or search on metacpan
script/git-perl view on Meta::CPAN
# - fixed bugtracker in Makefile.PL
# 0.1.6 - 2022.07.03
# - updated bugtracking/issues link in Makefile.PL
# - added ChangeLog
# 0.1.5 - 2022.07.02
# - updated documentation in script/git-perl and README.md to use head1 (head2 looks awful)
# 0.1.4 - 2022.07.02
# - moved README into README.md, so it can be visible on github and not rendered by metacpan
# - testing head2 instead of head1 on metacpan/github
# 0.1.3 - 2022.07.02
# - updated AUTHOR information in README and git-perl
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/Git/Workflow/Command/Watch.pm view on Meta::CPAN
When using --pull add these options to the pull command.
-f --file[=]regex
Watch file any files changing that match "regex"
-b --branch[=]regex
Watch for any changes to branches matching "regex"
by default looks only at local branches
-r --remote With --branch only look at remote branches
-a --all With --branch look at all branches (local and remote)
-m --max[=]int
Look only --max changes back in history to see what is
happening (Default 10)
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/GitFind/Searcher/FileSystem.pm view on Meta::CPAN
App::GitFind::Searcher::FileSystem - Search for files on disk
=head1 SYNOPSIS
This is an L<App::GitFind::Searcher> that looks through a file system.
=cut
# }}}1
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/GitGot/Command/gc.pm view on Meta::CPAN
use Moo;
extends 'App::GitGot::Command';
use namespace::autoclean;
# incremental output looks nicer for this command...
STDOUT->autoflush(1);
sub _use_io_page { 0 }
sub _execute {
my( $self, $opt, $args ) = @_;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/GitHooks/Plugin/RequireCommitMessage.pm view on Meta::CPAN
=head1 DESCRIPTION
If you are using C<App::GitHooks::Plugin::RequireTicketID>, commit messages
will need to include a ticket ID but the rest of the commit message can be
empty. To prevent this, this plugin looks at the commit message, excluding the
ticket ID, and requires that it is not empty before allowing the commit to go
through.
=head1 VERSION
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/GitHubPullRequest.pm view on Meta::CPAN
sub _api_url {
my ($url) = @_;
my $prefix = 'https://api.github.com/';
# If no URL specified, just return the API URL
return $prefix unless defined $url;
# If URL already looks like a GitHub API URL, do nothing
return $url if _is_api_url($url);
# Create an API URL out of a partial URL as
$url =~ s{^/*}{}; # Remove initial slashes, if any
return $prefix . $url;
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/Gitc/Util.pm view on Meta::CPAN
my $staged = git "$arguments --cached";
my $changed = git $arguments;
return if not $staged and not $changed;
# the tree is dirty, verify whether to continue
warn "It looks like you have uncommitted changes. If this is expected,\n"
. "type 'y' to continue. If it's not expected, type 'n'.\n"
. ( $staged ? "staged:\n$staged\n" : '' )
. ( $changed ? "changed:\n$changed\n" : '' )
;
die "Aborting at the user's request.\n" if not confirm('Continue?');
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/GnuplotUtils.pm view on Meta::CPAN
my (@x, @y);
if ($args{dataset_datas}) {
my $dataset = [split $fieldsep_re, $args{dataset_datas}[$i]];
while (@$dataset) {
my $item = shift @$dataset;
warn "Not a number in --dataset-data: '$item'" unless Scalar::Util::looks_like_number($item);
push @x, $item;
warn "Odd number of numbers in --dataset-data" unless @$dataset;
$item = shift @$dataset;
warn "Not a number in --dataset-data: '$item'" unless Scalar::Util::looks_like_number($item);
push @y, $item;
}
} else {
my $filename = $args{dataset_files}[$i];
my $content = File::Slurper::Dash::read_text($filename);
lib/App/GnuplotUtils.pm view on Meta::CPAN
chomp $content;
my @numbers = split $fieldsep_re, $content;
warn "Odd number of numbers in dataset file '$filename'" unless @numbers % 2 == 0;
while (@numbers) {
my $item = shift @numbers;
warn "Not a number in dataset file '$filename': '$item'" unless Scalar::Util::looks_like_number($item);
push @x, $item;
$item = shift @numbers;
warn "Not a number in dataset file '$filename': '$item'" unless Scalar::Util::looks_like_number($item);
push @y, $item;
}
}
my $dataset = Chart::Gnuplot::DataSet->new(
view all matches for this distribution
view release on metacpan or search on metacpan
ok($goto->cmd() =~ m#log/FOO #, 'Got the right hostname-based command');
};
GET_EVERYTHING_RIGHT: {
my $goto = App::Goto->new({ config => $config, args => [qw/lo log/] });
is($goto->cmd(), "ssh 127.0.0.1 -t 'cd /var/log/ && bash'", 'Everything looks good');
};
done_testing;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/Gre.pm view on Meta::CPAN
You can specify the output style with the -y option:
-y1 groups output by filename, with each matching line prepended
with it's line number. This is the default.
-y2 looks like classic grep output. Each line looks like file:line:match.
-y3 just has the matching line. This is the default for piped input.
goes well with the -p option sometimes.
-k will disable color output.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/Greple/stripe.pm view on Meta::CPAN
=cut
use List::Util qw(max pairmap first);
use Hash::Util qw(lock_keys);
use Scalar::Util;
*is_number = \&Scalar::Util::looks_like_number;
use Data::Dumper;
use Getopt::EX::Config qw(config set);
my $config = Getopt::EX::Config->new(
step => 2,
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/Greple/wordle/NYT.pm view on Meta::CPAN
loans loast loath loave lobar lobby lobed lobes lobos lobus local loche lochs
lochy locie locis locks locky locos locum locus loden lodes lodge loess lofts
lofty logan loges loggy logia logic logie login logoi logon logos lohan loids
loins loipe loirs lokes lokey lokum lolas loled lollo lolls lolly lolog lolos
lomas lomed lomes loner longa longe longs looby looed looey loofa loofs looie
looks looky looms loons loony loops loopy loord loose loots loped loper lopes
loppy loral loran lords lordy lorel lores loric loris lorry losed losel losen
loser loses lossy lotah lotas lotes lotic lotos lotsa lotta lotte lotto lotus
loued lough louie louis louma lound louns loupe loups loure lours loury louse
lousy louts lovat loved lovee lover loves lovey lovie lowan lowed lowen lower
lowes lowly lownd lowne lowns lowps lowry lowse lowth lowts loxed loxes loyal
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/Greple/select.pm view on Meta::CPAN
with extra conditional expression for B<find> command.
greple -Mdig foobar --dig . -name '*.p[lm]'
The problems is that the above command does not search perl command
script without suffixes. Next command looks for both files looking at
C<#!> (shebang) line.
greple -Mdig -Mselect --suffix=pl,pm --shebang perl foobar --dig .
Generic option B<--select-name>, B<--select-path> and B<--select-data>
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install.pm view on Meta::CPAN
if ( my $code = $sym->{$pwd} ) {
# Delegate back to parent dirs
goto &$code unless $cwd eq $pwd;
}
unless ($$sym =~ s/([^:]+)$//) {
# XXX: it looks like we can't retrieve the missing function
# via $$sym (usually $main::AUTOLOAD) in this case.
# I'm still wondering if we should slurp Makefile.PL to
# get some context or not ...
my ($package, $file, $line) = caller;
die <<"EOT";
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install.pm view on Meta::CPAN
if ( my $code = $sym->{$pwd} ) {
# Delegate back to parent dirs
goto &$code unless $cwd eq $pwd;
}
unless ($$sym =~ s/([^:]+)$//) {
# XXX: it looks like we can't retrieve the missing function
# via $$sym (usually $main::AUTOLOAD) in this case.
# I'm still wondering if we should slurp Makefile.PL to
# get some context or not ...
my ($package, $file, $line) = caller;
die <<"EOT";
view all matches for this distribution
view release on metacpan or search on metacpan
bin/http_this view on Meta::CPAN
=back
=head2 CONFIGURATION FILE
The script can read configuration options from a file. By default, it
looks for a file named C<.http_thisrc> in the current directory or
your home directory. You can specify a different file with the C<--config>
option or by setting the C<HTTP_THIS_CONFIG> environment variable.
The config file consists of lines in the format C<key=value>. The valid
keys are:
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/HTTP_Proxy_IMP/IMP.pm view on Meta::CPAN
# deflate
# according to RFC it should be zlib, but due to the encoding name
# often real deflate is used instead
# check magic bytes to decide
# lets see if it looks like a zlib header
# check for CM=8, CMID<=7 in first byte and valid FCHECK in
# seconds byte
return $more if length($buf)<2;
my $magic = unpack('C',substr($buf,0,1));
if (
( $magic & 0b1111 ) == 8 # CM = 8
and $magic >> 4 <= 7 # CMID <= 7
and unpack('n',substr($buf,0,2)) % 31 == 0 # valid FCHECK
) {
# looks like zlib header
$wb = +MAX_WBITS(); # see Compress::Raw::Zlib
} else {
# assume deflate
$wb = -MAX_WBITS(); # see Compress::Raw::Zlib
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/HomeBank2Ledger/Formatter/Beancount.pm view on Meta::CPAN
use v5.10.1; # defined-or
use warnings;
use strict;
use App::HomeBank2Ledger::Util qw(commify rtrim);
use Scalar::Util qw(looks_like_number);
use parent 'App::HomeBank2Ledger::Formatter';
our $VERSION = '0.010'; # VERSION
lib/App/HomeBank2Ledger/Formatter/Beancount.pm view on Meta::CPAN
$out[-1] .= ' '.join(' ', @tags);
}
my $metadata = $transaction->{metadata} || {};
for my $key (sort keys %$metadata) {
my $value = looks_like_number($metadata->{$key}) ? $metadata->{$key}
: $self->_format_string($metadata->{$key});
push @out, " ; ${key}: ${value}";
}
for my $posting (@postings) {
lib/App/HomeBank2Ledger/Formatter/Beancount.pm view on Meta::CPAN
push @out, join('', @line);
my $metadata = $posting->{metadata} || {};
for my $key (sort keys %$metadata) {
my $value = looks_like_number($metadata->{$key}) ? $metadata->{$key}
: $self->_format_string($metadata->{$key});
push @out, " ; ${key}: ${value}";
}
}
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install.pm view on Meta::CPAN
if ( my $code = $sym->{$pwd} ) {
# Delegate back to parent dirs
goto &$code unless $cwd eq $pwd;
}
unless ($$sym =~ s/([^:]+)$//) {
# XXX: it looks like we can't retrieve the missing function
# via $$sym (usually $main::AUTOLOAD) in this case.
# I'm still wondering if we should slurp Makefile.PL to
# get some context or not ...
my ($package, $file, $line) = caller;
die <<"EOT";
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install.pm view on Meta::CPAN
if ( my $code = $sym->{$pwd} ) {
# Delegate back to parent dirs
goto &$code unless $cwd eq $pwd;
}
unless ($$sym =~ s/([^:]+)$//) {
# XXX: it looks like we can't retrieve the missing function
# via $$sym (usually $main::AUTOLOAD) in this case.
# I'm still wondering if we should slurp Makefile.PL to
# get some context or not ...
my ($package, $file, $line) = caller;
die <<"EOT";
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install.pm view on Meta::CPAN
if ( my $code = $sym->{$pwd} ) {
# Delegate back to parent dirs
goto &$code unless $cwd eq $pwd;
}
unless ($$sym =~ s/([^:]+)$//) {
# XXX: it looks like we can't retrieve the missing function
# via $$sym (usually $main::AUTOLOAD) in this case.
# I'm still wondering if we should slurp Makefile.PL to
# get some context or not ...
my ($package, $file, $line) = caller;
die <<"EOT";
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install.pm view on Meta::CPAN
if ( my $code = $sym->{$pwd} ) {
# Delegate back to parent dirs
goto &$code unless $cwd eq $pwd;
}
unless ($$sym =~ s/([^:]+)$//) {
# XXX: it looks like we can't retrieve the missing function
# via $$sym (usually $main::AUTOLOAD) in this case.
# I'm still wondering if we should slurp Makefile.PL to
# get some context or not ...
my ($package, $file, $line) = caller;
die <<"EOT";
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install.pm view on Meta::CPAN
if ( my $code = $sym->{$pwd} ) {
# Delegate back to parent dirs
goto &$code unless $cwd eq $pwd;
}
unless ($$sym =~ s/([^:]+)$//) {
# XXX: it looks like we can't retrieve the missing function
# via $$sym (usually $main::AUTOLOAD) in this case.
# I'm still wondering if we should slurp Makefile.PL to
# get some context or not ...
my ($package, $file, $line) = caller;
die <<"EOT";
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/ImageMagickUtils.pm view on Meta::CPAN
'summary.alt.bool.not' => 'Do not skip previously downsized images',
schema => 'bool*',
default => 1,
description => <<'MARKDOWN',
By default, when given a filename that looks like it's already downsized, e.g.
`foo.1024-q40.jpg` or `foo.q40.jpg`, will skip downsizing. The
`--no-skip-downsized` option will process such filenames nevertheless.
MARKDOWN
},
lib/App/ImageMagickUtils.pm view on Meta::CPAN
}
if ($skip_whatsapp) {
require Regexp::Pattern::Filename::Type::Image::WhatsApp;
if ($file =~ $Regexp::Pattern::Filename::Type::Image::WhatsApp::RE{filename_type_image_whatsapp}{pat}) {
log_info "Filename '%s' looks like a WhatsApp image, skip downsizing due to --skip-whatsapp option is in effect", $file;
next FILE;
}
}
if ($skip_downsized) {
if ($file =~ /\.(?:\d+p?-)?q(?:\d{1,3})\.\w+\z/) {
log_info "Filename '%s' looks like it's already downsized, skip downsizing due to --skip-downsized option is in effect", $file;
next FILE;
}
}
my $q = $args{quality} // 40;
lib/App/ImageMagickUtils.pm view on Meta::CPAN
=item * B<skip_downsized> => I<bool> (default: 1)
Skip previously downsized images.
By default, when given a filename that looks like it's already downsized, e.g.
C<foo.1024-q40.jpg> or C<foo.q40.jpg>, will skip downsizing. The
C<--no-skip-downsized> option will process such filenames nevertheless.
=item * B<skip_whatsapp> => I<bool> (default: 1)
view all matches for this distribution