view release on metacpan or search on metacpan
bson/bson-timegm.c view on Meta::CPAN
if (yourtm.tm_isdst < 0 || mytm.tm_isdst == yourtm.tm_isdst)
break;
/*
** Right time, wrong type.
** Hunt for right time, right type.
** It's okay to guess wrong since the guess
** gets checked.
*/
sp = (const struct state *) gmtptr;
if (sp == NULL)
return WRONG;
view all matches for this distribution
view release on metacpan or search on metacpan
bin/original_script.pl view on Meta::CPAN
# modules that will be skipped for various reasons. (eg, no matching dist,
# couldn't parse out needed info, core/vendor-packaged modules, etc...)
my ($dist_info, $skipped_modules) =
collect_module_dist_info( $mi_objs, \@search_dirs );
# use all this data to guess what CPAN releases are installed on this
# machine. If we can find a matching dist name and version on the backpan
# we'll assume there's a match.
#
# $bp_releases is a hash of { dist name => [ dist file paths...] }
# $no_release_matched is an array of dist names where no matches were found
bin/original_script.pl view on Meta::CPAN
return \%dist_info, \%skipped_modules;
}
# use the info we have to:
# a. guess which version of the dist is installed
# b. look for a release (dist-name + version) in the backpan index.
sub find_backpan_releases {
my ($dist_info) = @_;
# releases we were able to match are hits
bin/original_script.pl view on Meta::CPAN
# we can assume that the "installed version" of that same
# module is the version of the dist we want to find as a
# release on the backpan.
my @version_types = qw( mb_mod_inst_ver mev_mod_inst_ver cpan_mod_inst_ver mi_mod_inst_ver );
my @version_guesses;
for my $mod_data ( @{ $release_data->{module_data} } ) {
next unless $latest_dist_ver eq $mod_data->{cpan_mod_latest_ver};
push @version_guesses, grep { $_ and $_ ne 'undef' }
@{$mod_data}{@version_types};
}
@version_guesses = reverse uniq sort @version_guesses;
if ( ! @version_guesses ) {
# if we couldn't find a correlation between the dist version
# and any of the module versions, move on.
#printf "%-30s %-15s [no matching module versions]\n", $dist_name, $latest_dist_ver;
push @bp_misses, $dist_name;
next DIST;
}
#printf "%-30s %-15s [%s] ", $dist_name, $latest_dist_ver, join ' ', @version_guesses;
# maybe we have to latest CPAN version?
if( grep { $_ eq $latest_dist_ver } @version_guesses ) {
#print "[LATEST]\n";
next DIST;
}
for my $ver_guess ( @version_guesses ) {
if( my $bp_release = $bp->release( $dist_name, $ver_guess ) ) {
my $rel_path = $bp_release->path;
push @{ $bp_hits{ $dist_name } ||= [] }, "$rel_path";
#print "[FOUND: " . join( ' ', $rel_path ). "]\n";
next DIST;
}
view all matches for this distribution
view release on metacpan or search on metacpan
- updates to bpc_attribCache to sanitize path names and prepending ac->currentDir
in bpc_attribCache_getDirEntries().
0.52: March 9, 2017
- updated config.guess and config.sub; fixes problem with aarch64 and ppc64le
reported by Denis Fateyev.
0.51: March 5, 2017
- added dynamic:: target to subdir Makefile.PLs to fix build issue on gentoo
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Badger/Factory.pm view on Meta::CPAN
}
}
return $self->error_msg('no_item')
unless $item;
# use 'items' in config, or grokked from $ITEMS, or guess plural
$items = $config->{ items } || $items || plural($item);
my $ipath = $item.PATH_SUFFIX;
my $inames = $item.NAMES_SUFFIX;
my $idefault = $item.DEFAULT_SUFFIX;
lib/Badger/Factory.pm view on Meta::CPAN
1;
The C<$ITEM> and C<$ITEMS> package variables are used to define the
singular and plural names of the items that the factory is responsible for.
In this particular case, the C<$ITEMS> declaration isn't strictly
necessary because the module would correctly "guess" the plural name
C<widgets> from the singular C<widget> defined in C<$ITEM>. However,
this is only provided as a convenience for those English words that
pluralise regularly and shouldn't be relied upon to work all the time.
See the L<pluralise()|Badger::Utils/pluralise()> method in L<Badger::Utils>
for further information, and explicitly specify the plural in C<$ITEMS> if
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Banal/Config.pm view on Meta::CPAN
has 'verbose' => (is => 'rw', lazy_build=>1);
has 'debug' => (is => 'rw', lazy_build=>1);
has 'switches' => (is => 'rw', isa => 'HashRef', default=>sub{{}}); # Typically contains command line switches as produced by Getopt::Long or Getopt::Descriptive, or something that resembles it.
has 'options' => (is => 'rw', isa => 'HashRef', default=>sub{{}}); # The hash that gets passed to "new" for the actual configuration object (xcfg). The 'ConfigFile' option will default to the value of 'source' property.
has 'source' => (is => 'rw', isa => 'Str', lazy_build=>1); # The path to the configuration file. If it's not set, it will be guessed based on the name of the running process ($0). Note that this may be overriden by the "-ConfigFile" option.
has 'xcfg_class' => (is => 'rw', isa => 'Str', default=>'Banal::Config::General::Extended' );
has 'xcfg' => (
is => 'rw',
isa => 'Banal::Config::General::Extended',
lazy_build => 1,
lib/Banal/Config.pm view on Meta::CPAN
#***************************************************
#Â Less likely overrides
#***************************************************
#-----------------------------------------------
sub guess_config_file_path {
my $self = shift;
my $args = $self->switches;
$args = {%$args, @_}; # swicth overrides are possible by passing arguments to the function.
# If we have an explicit argument for the config file path, return that.
lib/Banal/Config.pm view on Meta::CPAN
}
#--------------------------------------
sub _build_source {
my $self = shift;
return $self->guess_config_file_path();
}
#--------------------------------------
sub _build_xcfg {
my $self = shift;
lib/Banal/Config.pm view on Meta::CPAN
Can be overridden.
=head2 get_default_config_file_base_name()
The default base name of the configuration file, which will be searched in several places when trying to "guess" the config file path.
This would only be needed when there is no explicit config file path given.
By default, simply calls "get_default_config_term()".
=head2 guess_config_file_path()
A call to this class method is made in order to build the default value of the "source" attribute, which will be used as the source path for the config file UNLESS one is explicetly given in the options argument to new().
The current implementation goes as follows:
- It will first try suitable "switches". If one that designates the config fie path is defined, the that one will be return. By default, here are those switches that will be checked for definedness:
lib/Banal/Config.pm view on Meta::CPAN
where $base_name is obtained by a call to get_default_config_file_base_name()
=head2 get_possible_option_names_for_config_file_path
Used by guess_config_file_path() to check for command line switches.
Currently returns the list: cfg_[%TERM%] [%TERM%]_cfg cfg
where TERM is obtained by a call to get_default_config_term()
=head2 get_possible_environment_variable_names_for_config_file_path
Used by guess_config_file_path() to check for ENVIRONMENT variables.
Currently returns the list: [%TERM%]_CFG CFG_[%TERM%]
where TERM is obtained by a call to get_default_config_term()
=head2 get_possible_config_file_paths()
Used by guess_config_file_path() after trying command line swictches and ENV variables.
At this point (when everything else is exhausted), the first file that exists in the list returned by this function will be used as the config file.
Currently returns the list:
"./test/etc/" . $base_name . ".conf", # this one is for testing purposes during "make test"
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
#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
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
lib/Bash/Completion/Plugins/VimTag.pm view on Meta::CPAN
close $fh or next;
}
# Special case if the word contains one or more colons: Only return the
# part of each completion that comes after the last colon. This has to do
# with bash using the colon as a delimiter, I guess.
if ($word =~ /^(.+::?)/) {
my $prefix_length = length $1;
substr($_, 0, $prefix_length) = '' for @candidates;
}
$r->candidates(@candidates);
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
lib/Beekeeper/Logger.pm view on Meta::CPAN
_BUS => undef,
@_
};
unless ($self->{service}) {
# Make an educated guess based on worker class
my $service = lc $self->{worker_class};
$service =~ s/::/-/g;
$service =~ s/-worker$//;
$self->{service} = $service;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Bencher/Scenario/ShellGuess/Overhead.pm view on Meta::CPAN
use 5.010001;
use strict;
use warnings;
our $scenario = {
summary => 'Benchmark the startup overhead of guessing shell',
participants => [
{
name => 'load Shell::Guess',
perl_cmdline => ['-MShell::Guess', '-e1'],
},
lib/Bencher/Scenario/ShellGuess/Overhead.pm view on Meta::CPAN
},
],
};
1;
# ABSTRACT: Benchmark the startup overhead of guessing shell
__END__
=pod
=encoding UTF-8
=head1 NAME
Bencher::Scenario::ShellGuess::Overhead - Benchmark the startup overhead of guessing shell
=head1 VERSION
This document describes version 0.003 of Bencher::Scenario::ShellGuess::Overhead (from Perl distribution Bencher-Scenarios-ShellGuess), released on 2021-07-31.
view all matches for this distribution
view release on metacpan or search on metacpan
data/wiki1.html view on Meta::CPAN
</li>
<li id="cite_note-331"><span class="mw-cite-backlink"><b><a href="#cite_ref-331">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r999302996"/><cite class="citation web cs1"><a rel="n...
</li>
<li id="cite_note-332"><span class="mw-cite-backlink"><b><a href="#cite_ref-332">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r999302996"/><cite class="citation news cs1"><a rel="...
</li>
<li id="cite_note-333"><span class="mw-cite-backlink"><b><a href="#cite_ref-333">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r999302996"/><cite id="CITEREFBaylor,_Michael_[@n...
</li>
<li id="cite_note-iridium-rideshare-334"><span class="mw-cite-backlink">^ <a href="#cite_ref-iridium-rideshare_334-0"><sup><i><b>a</b></i></sup></a> <a href="#cite_ref-iridium-rideshare_334-1"><sup><i><b>b</b></i></sup></a></span> <span class="refere...
</li>
<li id="cite_note-grace-fo-launch-335"><span class="mw-cite-backlink"><b><a href="#cite_ref-grace-fo-launch_335-0">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r999302996"/><cite ...
</li>
view all matches for this distribution
view release on metacpan or search on metacpan
share/PerlCritic/Critic/Policy/Subroutines/RequireFinalReturn.pm view on Meta::CPAN
Furthermore, if the programmer did not mean for there to be a
significant return value, and omits a return statement, some of the
subroutine's inner data can leak to the outside. Consider this case:
package Password;
# every time the user guesses the password wrong, its value
# is rotated by one character
my $password;
sub set_password {
$password = shift;
}
sub check_password {
my $guess = shift;
if ($guess eq $password) {
unlock_secrets();
} else {
$password = (substr $password, 1).(substr $password, 0, 1);
}
}
1;
In this case, the last statement in check_password() is the
assignment. The result of that assignment is the implicit return
value, so a wrong guess returns the right password! Adding a
C<return;> at the end of that subroutine solves the problem.
The only exception allowed is an empty subroutine.
Be careful when fixing problems identified by this Policy; don't
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Benchmark/Serialize/Library/ProtocolBuffers.pm view on Meta::CPAN
=over 4
=item register $name => $proto, %options
Registers a benchmark of the protocol specified by C<$proto> with the
benchmark name C<$name>. The module make a best guess of the class name to use
for encoding. If this fails it can be forced by using a
C<class =E<gt> $classname> option.
=back
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
inc/boilerplate.pl view on Meta::CPAN
my $meta = CPAN::Meta->load_file( 'META.json' );
my $license = do {
my @key = ( $meta->license, $meta->meta_spec_version );
my ( $class, @ambiguous ) = Software::LicenseUtils->guess_license_from_meta_key( @key );
die if @ambiguous or not $class;
$class->new( $meta->custom( 'x_copyright' ) );
};
$file{'LICENSE'} = trimnl $license->fulltext;
view all matches for this distribution
view release on metacpan or search on metacpan
BerkeleyDB.pod view on Meta::CPAN
It would be much better if you could ignore the NULL terminations issue
in the main application code and have a mechanism that automatically
added the terminating NULL to all keys and values whenever you write to
the database and have them removed when you read from the database. As I'm
sure you have already guessed, this is a problem that DBM Filters can
fix very easily.
use strict ;
use BerkeleyDB ;
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/Bible/Reference.pm view on Meta::CPAN
When you call this method with good input, it will save the new Bible and
internally call C<bible()> to set the new Bible as active.
You may optionally provide an additional arrayref of arrayrefs containing the
maximum verse number for each chapter of a book. This is useful only if you
need to call C<expand_ranges>. If you don't pass this data, a best-guess of the
data will be used.
=head2 expand_ranges
This is a helper method. It's called automatically if C<add_detail> is set to a
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Biblio/Citation/Parser/Citebase.pm view on Meta::CPAN
$cite->find_jnl_name();
return 1
};
if ($cite->guess_vol_no_pg()) {
$cite->find_jnl_name();
return 1;
};
if ($cite->find_vol_no() or
lib/Biblio/Citation/Parser/Citebase.pm view on Meta::CPAN
$cite->find_year();
return 1;
};
if ($cite->guess_vol_pg()) {
$cite->find_year();
$cite->find_jnl_name();
return 1;
};
if ($cite->guess_vol_year()) {
$cite->find_page();
$cite->find_jnl_name();
return 1;
lib/Biblio/Citation/Parser/Citebase.pm view on Meta::CPAN
return 0;
}
# Apt'e, C., et al. ACM Transactions on Information Systems 12, 3, 233-251
sub guess_vol_no_pg {
my $cite = shift;
return 1 if ($cite->{'volume'} and $cite->{'issue'} and
$cite->{'spage'});
return 0 if ($cite->{'num_of_fig'} < 3);
lib/Biblio/Citation/Parser/Citebase.pm view on Meta::CPAN
}
# '15:190' (15A:190-195, 14-15:190-180, or "Astrophys. J. 8, 103");
# Called this after '{find_vol_{no}_pg_year}' failed.
sub guess_vol_pg {
my $cite = shift;
return 1 if ($cite->{'volume'} and $cite->{'spage'});
return 0 if ($cite->{'num_of_fig'} < 2);
my $Text = $cite->{'rest_text'};
lib/Biblio/Citation/Parser/Citebase.pm view on Meta::CPAN
#
# G. Smith and H. Gray; Pub. Astron. Soc. Japan, 2000, vol. 52
# To find $cite->{'jnl_epos'} currectly. Note that '2000' may be
# regarded as the journal name (by subroutine find_vol).
sub guess_vol_year {
my $cite = shift;
return 0 if ($cite->{'num_of_fig'} < 2);
my $Text = $cite->{'rest_text'};
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/Biblio/Thesaurus/SQLite.pm view on Meta::CPAN
##
# Does the same thing as the previous method, but outputs the data in an
# ISO Thesaurus format
# @param .....
# @param guess w00t ?
sub getTermAsISOthe {
my $termo = shift or die;
my $dbfile = shift or die;
# connect to the database
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Big5.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
lib/Big5HKSCS.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
lib/Bigtop/Docs/TentRef.pod view on Meta::CPAN
=back
In addition to the statements that affect the whole controller, there
are methods in it. Methods come in seven types, shown below.
There are two statements they all understand: no_gen (take a guess)
and extra_args. Any extra_args -- and you can have as many as you like --
are added to the argument list in the generated routine. Be sure to
include full perl variables, including sigils:
$id
view all matches for this distribution
view release on metacpan or search on metacpan
lib/BingoX/Argon.pm view on Meta::CPAN
=item C<data_class> ( )
Static method returns data class defined for application subclass.
If none is assigned, guess. :-)
=cut
sub data_class {
my $self = shift;
my $class = ref($self) || $self;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Bio/AGP/LowLevel.pm view on Meta::CPAN
$r{is_gap} = 0;
@r{qw(ident cstart cend orient)} = @fields;
if($opt{validate_identifiers}) {
my $comp_type = identifier_namespace($r{ident})
or parse_error("cannot guess type of '$r{ident}'");
} else {
$r{ident} or parse_error("invalid identifier '$r{ident}'");
}
str_in($r{orient},qw/+ - 0 na/)
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Bio/Affymetrix/CHP.pm view on Meta::CPAN
=head2 smooth_factor
Arg [1] : float $smooth_factor (optional)
Example : my $smooth_factor=$chp->smooth_factor();
Description: Get/set the smooth factor. Your guess is as good as
mine as to what this actually is, although it is used in calculating
the background. Not available in MAS5 files.
Returntype : float
Exceptions : none
Caller : general
lib/Bio/Affymetrix/CHP.pm view on Meta::CPAN
Example : my @background_zones=@{$chp->background_zones()};
# Print "X", "Y", "Background Value" for background zone 0
print $background_zones[0]->[0],$background_zones[0]->[1],$background_zones[0]->[2];
Description: Get/set an array of background zones. Again, your guess is as good as
mine as to what this actually is, although it is used in calculating
the background. Not available in MAS5 files.
Returns an arrayref to an arrayref. Each zone has an array three
values long, which are X,Y and background value respectively.
view all matches for this distribution