view release on metacpan or search on metacpan
script/_ppgrep view on Meta::CPAN
# my $self = shift;
# $self->{stream} .= join '', @_;
#}
#
## Emit a string value. YAML has many scalar styles. This routine attempts to
## guess the best style for the text.
#sub _emit_str {
# my $self = shift;
# my $type = $_[1] || 0;
#
# # Use heuristics to find the best scalar emission style.
view all matches for this distribution
view release on metacpan or search on metacpan
avoid ualarm.
smoketesting fails where it is absent (Win32 strawberry),
and I chose ualarm by analogy with usleep,
not realising that Time::HiRes::alarm could do what I need,
and I now guess that alarm($frac) is supported on win32.
warn reader of the delay, although it should generally be short;
s/ualarm/alarm/ , but still from Time::HiRes;
check also that it didn't take too long
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/rdapper.pm view on Meta::CPAN
=item * C<--reverse> - if you provide an IP address or CIDR prefix, then this
option causes C<rdapper> to display the record of the corresponding
C<in-addr.arpa> or C<ip6.arpa> domain.
=item * C<--type=TYPE> - explicitly set the object type. C<rdapper> will
guess the type by pattern matching the value of C<OBJECT> but you can override
this by explicitly setting the C<--type> argument to one of : C<ip>,
C<autnum>, C<domain>, C<nameserver>, C<entity> or C<url>.
=over
view all matches for this distribution
view release on metacpan or search on metacpan
script/_reposdb-inline view on Meta::CPAN
# my $self = shift;
# $self->{stream} .= join '', @_;
#}
#
## Emit a string value. YAML has many scalar styles. This routine attempts to
## guess the best style for the text.
#sub _emit_str {
# my $self = shift;
# my $type = $_[1] || 0;
#
# # Use heuristics to find the best scalar emission style.
view all matches for this distribution
view release on metacpan or search on metacpan
1.006 2025-01-08T03:05:31Z
* first release of a little program I use instead of which(1).
My version takes a regex and looks in all the directories.
1.006 2022-01-08T08:56:01Z
* First release, I guess? I use this as a pattern-aware which(1)-like
utility.
1.005 2021-01-13T11:14:01Z
* freshen distro, remove Travis CI, add Github Actions
view all matches for this distribution
view release on metacpan or search on metacpan
packages somewhere inside your home directory while still using your
favorite distribution.
Till this day, I still haven't tried systemd once, I don't know one single
objective reason why I don't use it, but it's true enough that it's the
very first motivation that got all these things started. I guess that's just
how the world is, few things are objective while basically everything is
subjective. Nevertheless, the goal of B<rs> is to avoid all these subjective
feelings and views on how a distribution should be made, which init system
should be used, what configure switches, compiling flags should be passed,
whether stable version should be preferred over bleeding edge version or the
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/sdview/Parser/Pod.pm view on Meta::CPAN
$text .= "\n" . $_ for @lines;
my $language = $para->language;
if( ( $language // "" ) eq "__AUTO__" ) {
# Try to detect the language. It doesn't have to be perfect, just a good
# guess is enough.
undef $language;
if( $text =~ m/^use [A-Za-z_]|^package [A-Za-z_]/ ) {
$language = "perl";
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/sh2p/Here.pm view on Meta::CPAN
package App::sh2p::Here;
# I expect only one active here doc at a time,
# but I guess they could be in nested loops
# while read var1
# do
# while read var2
# do
# ...
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/shcompgen.pm view on Meta::CPAN
};
our @supported_shells = qw(bash fish zsh tcsh);
our %shell_arg = (
shell => {
summary => 'Override guessing and select shell manually',
schema => ['str*', {in=>\@supported_shells}],
tags => ['common'],
cmdline_aliases => {
fish => {summary=>"Shortcut for --shell=fish", is_flag=>1, code=>sub { $_[0]{shell} = "fish" }},
zsh => {summary=>"Shortcut for --shell=zsh" , is_flag=>1, code=>sub { $_[0]{shell} = "zsh" }},
lib/App/shcompgen.pm view on Meta::CPAN
}
$envres->as_struct;
}
$SPEC{guess_shell} = {
v => 1.1,
summary => 'Guess running shell',
args => {
},
};
sub guess_shell {
my %args = @_;
my $setdef_res = _set_args_defaults(\%args);
return $setdef_res unless $setdef_res->[0] == 200;
lib/App/shcompgen.pm view on Meta::CPAN
=item * B<prog>* => I<str>
=item * B<shell> => I<str>
Override guessing and select shell manually.
=back
Returns an enveloped result (an array).
lib/App/shcompgen.pm view on Meta::CPAN
The default behavior is to skip if an existing completion script exists.
=item * B<shell> => I<str>
Override guessing and select shell manually.
=item * B<stdout> => I<bool>
Output completion script to STDOUT.
lib/App/shcompgen.pm view on Meta::CPAN
Return value: (any)
=head2 guess_shell
Usage:
guess_shell() -> [$status_code, $reason, $payload, \%result_meta]
Guess running shell.
This function is not exported.
lib/App/shcompgen.pm view on Meta::CPAN
This is possible for only some types of scripts, e.g. L<Perinci::CmdLine>-
(that does not have subcommands) or L<Getopt::Long::Descriptive>-based ones.
=item * B<shell> => I<str>
Override guessing and select shell manually.
=item * B<tcsh_global_dir> => I<array[str]> (default: ["/etc/tcsh/completions"])
Directory to put completions scripts.
lib/App/shcompgen.pm view on Meta::CPAN
This is possible for only some types of scripts, e.g. L<Perinci::CmdLine>-
(that does not have subcommands) or L<Getopt::Long::Descriptive>-based ones.
=item * B<shell> => I<str>
Override guessing and select shell manually.
=item * B<tcsh_global_dir> => I<array[str]> (default: ["/etc/tcsh/completions"])
Directory to put completions scripts.
lib/App/shcompgen.pm view on Meta::CPAN
Can contain path (e.g. C<../foo>) or a plain word (C<foo>) in which case will be
searched from PATH.
=item * B<shell> => I<str>
Override guessing and select shell manually.
=item * B<tcsh_global_dir> => I<array[str]> (default: ["/etc/tcsh/completions"])
Directory to put completions scripts.
view all matches for this distribution
view release on metacpan or search on metacpan
script/skos2jskos view on Meta::CPAN
}
else {
info "Reading RDF files";
my $size = 0;
foreach my $file (@ARGV) {
my $parser = RDF::Trine::Parser->guess_parser_by_filename($file);
$parser->parse_file_into_model( "file://$file", $file, $source );
debug $source->size - $size . " triples from $file";
$size = $source->size;
}
}
view all matches for this distribution
view release on metacpan or search on metacpan
script/soapcli.pl view on Meta::CPAN
The first argument is a request data as a JSON string or a name of file which
contains data in JSON or YAML format.
The second argument is an URL address to WSDL data or a filename of WSDL data
file or a file which contains an URL address to WSDL data. This filename is
optional and can be guessed from first argument.
The third argument is an URL address of endpoint with a name of a webservice
port. The URL address of endpoint is optional if is already a part of WSDL
data. The name of port is optional if it is unambiguous for called method. The
name of port should start with C<#> character.
view all matches for this distribution
view release on metacpan or search on metacpan
bin/sourcepan view on Meta::CPAN
=over 4
=item --dist
Clarifies that the items named on the commandline are distribution names (i.e.
base names of archives). Usually not required, as this will be guessed if the
item name contains a C<-> character.
=item --module
Clarifies that the items named on the commandline are module names (i.e. perl
view all matches for this distribution
view release on metacpan or search on metacpan
DOS we can use these alternate names for tools that don't take spaces
into account.
spaceless converts PATH style environment variables on windows into
equivalents that do not have spaces. By default it uses Shell::Guess to
make a reasonable guess as to the shell you are currently using (not
your login shell). You may alternately specify a specific shell type
using one of the options below.
spaceless will not convert long directory (non 8.3 format) names that
do not have spaces, as these are usually handled gracefully by scripts
--login
Use the your default login shell (as determined by Shell::Guess) On
Unix style systems this consults the GECOS field in the /etc/passwd
file or uses NIS. On other platforms it may use another means to
determine your login shell, or simply make an informed guess based on
the platform.
--no-cygwin
Remove any cygwin paths. Has no affect on non cygwin platforms.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/tkispell.pm view on Meta::CPAN
program should save the spell-checked file and the replacement words
in the user's personal dictionary if necessary.
The entry box at the lower right contains replacement text for
misspelled words. The text in the entry is either a selection
from the word guesses or a word entered by the user.
Buttons on the right side of the window select options for replacing
possibly misspelled words.
=head2 Accept
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/tldr.pm view on Meta::CPAN
$self->{argv} = \@argv;
if ($language) {
$language = $language =~ /^\./ ? $language : ".$language";
}
$self->{language} = $language || '';
if (!$no_pager and -t STDOUT and my $guess = $self->_guess_pager($pager)) {
$self->{pager} = $guess;
}
push @{$self->{platform}}, $self->_guess_platform, "common";
$self;
}
sub _guess_pager {
my $self = shift;
my $cmd;
for my $try (grep $_, @_, $ENV{PAGER}, "less", "more") {
if (my $found = File::Which::which($try)) {
lib/App/tldr.pm view on Meta::CPAN
$out;
}
# XXX
sub _guess_platform {
$^O =~ /darwin/i ? "osx" :
$^O =~ /linux/i ? "linux" :
$^O =~ /sunos/i ? "sunos" : ();
}
view all matches for this distribution
view release on metacpan or search on metacpan
}
elsif ( $arg =~ $ENTITY_PATTERN or $arg =~ $SITELINK_PATTERN ) {
'lookup';
}
else {
my $guess = () = $arg =~ /[a-z]+:[^\s]/gi;
$guess += () = $arg =~ /<[^>]+>/g;
$guess += () = $arg =~ /[?\$][^\s]/g;
if ( $guess > 2 ) {
warning("ignoring additional command line argument")
if $OPT{query} or @ARGV > 1;
'query';
}
else {
=head1 MODES
Request mode C<query> (default), C<lookup>, C<serch>, or C<psearch> can
explicitly be set via first argument or it's guessed from arguments.
=head2 query
Read SPARQL query from STDIN, option C<--query|-q>, or argument. Namespace
definitions and C<SELECT> clause are added if missing.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/week.pm view on Meta::CPAN
}
sub argv {
my $app = shift;
for (@{$app->ARGV}) {
call \&guess_date,
for => $app,
with => [ qw(year mon mday show_year) ];
}
return $app;
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/wmiirc/Backlight.pm view on Meta::CPAN
use App::wmiirc::Plugin;
with 'App::wmiirc::Role::Key';
# So on my vaio the down works here, but up doesn't(?!), I've hacked it into the
# acpi stuff instead -- urgh. Serves me right for buying proprietary Sony stuff
# I guess.
sub key_backlight_down(XF86MonBrightnessDown) {
system qw(xbacklight -steps 1 -time 0 -dec 10);
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/wordlist.pm view on Meta::CPAN
Included in the distribution is the <prog:wordlist-wordle> script for
convenience. This CLI defaults to grepping the "EN::Wordle" wordlist and you
specify something like `wt_S_` for the pattern (lowercase for letter in
incorrect position, uppercase for letter in correct position, underscore for
unguessed):
% wordlist-wordle 'wt_S_'
_
};
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/AutoInstall.pm view on Meta::CPAN
else {
print
"*** Dependencies will be installed the next time you type '$make'.\n";
}
# make an educated guess of whether we'll need root permission.
print " (You may need to do that as the 'root' user.)\n"
if eval '$>';
}
print "*** $class configuration finished.\n";
inc/Module/AutoInstall.pm view on Meta::CPAN
or _load('CPANPLUS::Shell::Default')
)
);
}
# make guesses on whether we're under the CPAN installation directory
sub _under_cpan {
require Cwd;
require File::Spec;
my $cwd = File::Spec->canonpath( Cwd::cwd() );
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/AutoInstall.pm view on Meta::CPAN
else {
print
"*** Dependencies will be installed the next time you type '$make'.\n";
}
# make an educated guess of whether we'll need root permission.
print " (You may need to do that as the 'root' user.)\n"
if eval '$>';
}
print "*** $class configuration finished.\n";
inc/Module/AutoInstall.pm view on Meta::CPAN
or _load('CPANPLUS::Shell::Default')
)
);
}
# make guesses on whether we're under the CPAN installation directory
sub _under_cpan {
require Cwd;
require File::Spec;
my $cwd = File::Spec->canonpath( Cwd::getcwd() );
view all matches for this distribution
view release on metacpan or search on metacpan
lib/AppleII/Disk.pm view on Meta::CPAN
r Allow reads (this is actually ignored; you can always read)
w Allow writes
d Disk image is in DOS 3.3 order
p Disk image is in ProDOS order
If you don't specify 'd' or 'p', then the format is guessed from the
filename. '.PO' and '.HDV' files are ProDOS order, and anything else
is assumed to be DOS 3.3 order.
If you specify 'w' to allow writes, then the image file is created if
it doesn't already exist.
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/AutoInstall.pm view on Meta::CPAN
if ( @Missing and not( $CheckOnly or $UnderCPAN ) ) {
require Config;
print
"*** Dependencies will be installed the next time you type '$Config::Config{make}'.\n";
# make an educated guess of whether we'll need root permission.
print " (You may need to do that as the 'root' user.)\n"
if eval '$>';
}
print "*** $class configuration finished.\n";
inc/Module/AutoInstall.pm view on Meta::CPAN
or _load('CPANPLUS::Shell::Default')
)
);
}
# make guesses on whether we're under the CPAN installation directory
sub _under_cpan {
require Cwd;
require File::Spec;
my $cwd = File::Spec->canonpath( Cwd::cwd() );
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Devel/PPPort.pm view on Meta::CPAN
#ifndef IVSIZE
# ifdef LONGSIZE
# define IVSIZE LONGSIZE
# else
# define IVSIZE 4 /* A bold guess, but the best we can make. */
# endif
#endif
#ifndef UVTYPE
# define UVTYPE unsigned IVTYPE
#endif
view all matches for this distribution
view release on metacpan or search on metacpan
share/files/public/skins/default/jquery-ui-1.9.1.custom/development-bundle/external/jshint.js view on Meta::CPAN
// value is the JSHINT function itself.
var JSHINT = (function () {
"use strict";
var anonname, // The guessed name for anonymous functions.
// These are operators that should not be used with the ! operator.
bang = {
"<" : true,
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Arabic.pm view on Meta::CPAN
if ( $condition && ... ) { print "Hello\n" };
There are some cases where Perl can't immediately tell the difference between an
expression and a statement. For instance, the syntax for a block and an anonymous
hash reference constructor look the same unless there's something in the braces that
give Perl a hint. The yada yada is a syntax error if Perl doesn't guess that the
{ ... } is a block. In that case, it doesn't think the ... is the yada yada because
it's expecting an expression instead of a statement:
my @transformed = map { ... } @input; # syntax error
view all matches for this distribution
view release on metacpan or search on metacpan
perllib/Arch/Changeset.pm view on Meta::CPAN
if (-f "$self->{dir}/=ancestor") {
$ancestor = load_file("$self->{dir}/=ancestor");
chomp($ancestor);
}
unless ($ancestor) {
# just guess
my $revision = $self->{revision};
$ancestor = adjacent_revision($revision, -1) || $revision;
}
return $self->{ancestor} = $ancestor;
}
perllib/Arch/Changeset.pm view on Meta::CPAN
=item B<ancestor>
Return the ancestor of the changeset. If I<=ancestor> file is found (that is
the case for library changesets) its content is returned, otherwise try to
guess the ancestor of the revision using B<Arch::Util::adjacent_revision>.
=back
=head1 BUGS
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/AutoInstall.pm view on Meta::CPAN
else {
print
"*** Dependencies will be installed the next time you type '$make'.\n";
}
# make an educated guess of whether we'll need root permission.
print " (You may need to do that as the 'root' user.)\n"
if eval '$>';
}
print "*** $class configuration finished.\n";
inc/Module/AutoInstall.pm view on Meta::CPAN
or _load('CPANPLUS::Shell::Default')
)
);
}
# make guesses on whether we're under the CPAN installation directory
sub _under_cpan {
require Cwd;
require File::Spec;
my $cwd = File::Spec->canonpath( Cwd::cwd() );
view all matches for this distribution
view release on metacpan or search on metacpan
xs/ppport.h view on Meta::CPAN
print "It may very well be supported all the way back to ",
format_version(5.003_07), ".\n";
}
else {
print "But given the things $f depends on, it's a good",
" guess that it isn't\n",
"supported prior to ", format_version($todo), ".\n";
}
}
}
}
xs/ppport.h view on Meta::CPAN
#ifndef IVSIZE
# ifdef LONGSIZE
# define IVSIZE LONGSIZE
# else
# define IVSIZE 4 /* A bold guess, but the best we can make. */
# endif
#endif
#ifndef UVTYPE
# define UVTYPE unsigned IVTYPE
#endif
view all matches for this distribution