view release on metacpan or search on metacpan
binmode *file;
$save_btr->{'opt'}{'handle'}=\*file; #store filehandle in object
}
###################################################################
# config() looks for a config file which tells us where the
# offsets are in the fixed part of the record, their types and
# what to call them locally.
###################################################################
sub config {
this page. Lane is probably the most interested in making this work, so
may be your best initial bet.
=head2 BTRIEVE::SAVE::REC structure.
A save file record on disk looks like:
__________________________________________
| Fixed, | Fixed, | |
Count[, ] | indexed. | left-over| Variable |\r\n
|___________________|__________|___________|
view all matches for this distribution
view release on metacpan or search on metacpan
lib/BZ/Client/Bug.pm view on Meta::CPAN
C<see_also> points to a hash, which contains two keys, C<added> and C<removed>.
These are arrays of strings, representing the actual changes that were made to the bug.
Here's a diagram of what the return value looks like for updating bug ids 1 and 2:
{
1 => {
see_also => {
added => [(an array of bug URLs)],
lib/BZ/Client/Bug.pm view on Meta::CPAN
C<tags> points to a hash, which contains two keys, C<added> and C<removed>.
These are arrays of strings, representing the actual changes that were made to the bug.
Here's a diagram of what the return value looks like for updating bug ids 1 and 2:
{
1 => {
tags => {
added => [(an array of tags)],
view all matches for this distribution
view release on metacpan or search on metacpan
lib/BabelObjects/Component/Data/Configurator.pm view on Meta::CPAN
use BabelObjects::Component::Data::Configurator;
blah blah blah
=head1 DESCRIPTION
Stub documentation for BabelObjects::Component::Data::Configurator was created by h2xs. It looks like the
author of the extension was negligent enough to leave the stub
unedited.
Blah blah blah.
view all matches for this distribution
view release on metacpan or search on metacpan
BabelObjects/Component/Test/BabelObjects/Test.pm view on Meta::CPAN
use BabelObjects::Component::BabelObjects::Test;
blah blah blah
=head1 DESCRIPTION
Stub documentation for BabelObjects::Component::Test::BabelObjects::Test was created by h2xs. It looks like the
author of the extension was negligent enough to leave the stub
unedited.
Blah blah blah.
view all matches for this distribution
view release on metacpan or search on metacpan
- A regex that's stripping off the leading path needed \Q .. \E
wrapped around the path -- was causing test failures on Windows.
0.05 2014-05-05
- Make the path separator be / on Windows, so the generated index
looks the same everywhere.
0.04 2014-05-04
- New tests were failing on Windows, because the line endings in the
generated files weren't the same as the exemplars I generated on
my mac. Added test utility function for comparing text files
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Backblaze/B2V2Client.pm view on Meta::CPAN
return $self->{current_status};
}
# method to retrieve file names / info from a bucket
# this client library is bucket-name-centric, so it looks for the bucket name as a arg
# if there are more than 1000 files, then call this repeatedly
our $B2_MAX_FILE_COUNT = 1000;
sub b2_list_file_names {
my ($self, $bucket_name, %args) = @_;
view all matches for this distribution
view release on metacpan or search on metacpan
configure.sh view on Meta::CPAN
ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
fi
# We set ac_cv_exeext here because the later test for it is not
# safe: cross compilers may not add the suffix if given an `-o'
# argument, so we may need to know it at that point already.
# Even if this section looks crufty: it has the advantage of
# actually working.
break;;
* )
break;;
esac
configure.sh view on Meta::CPAN
# If we can't find connect, try looking in -lsocket, -lnsl, and -linet.
# These need checks to be before checks for any other functions that
# might be in the same libraries.
# The Irix 5 libc.so has connect and gethostbyname, but Irix 5 also has
# libsocket.so which has a bad implementation of gethostbyname (it
# only looks in /etc/hosts), so we only look for -lsocket if we need
# it.
for ac_func in connect
do :
ac_fn_c_check_func "$LINENO" "connect" "ac_cv_func_connect"
if test "x$ac_cv_func_connect" = xyes; then :
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Badge/Depot/Plugin/Githubactions.pm view on Meta::CPAN
=for html The badge will look similar to this:
<a href="https://github.com/Csson/p5-Badge-Depot-Plugin-Githubactions/actions?query=workflow%3Amakefile-test+branch%3Amaster"><img src="https://img.shields.io/github/workflow/status/Csson/p5-Badge-Depot-Plugin-Githubactions/makefile-test/master" alt=...
=head1 ATTRIBUTES
The C<user> and C<repo> attributes are required or optional, depending on your configuration. It looks for the C<resources/repository/web> setting in C<META.json>:
=over 4
=item *
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Badge/Depot/Plugin/Perl.pm view on Meta::CPAN
All attributes are optional.
=head2 version
The minimum supported Perl version. If it isn't given, it looks for a C<prereqs/runtime/requires/perl> entry in C<META.json> and uses that.
It is set to 'unknown' if it is neither given or exists in C<META.json>.
=head2 trailing
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Badge/Depot/Plugin/Travis.pm view on Meta::CPAN
This class consumes the L<Badge::Depot> role.
=head1 ATTRIBUTES
The C<user> and C<repo> attributes are required or optional, depending on your configuration. It looks for the C<resources/repository/web> setting in C<META.json>:
=over 4
=item *
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Badger/Base.pm view on Meta::CPAN
sub not_yet_working {
shift->todo;
}
The error message generated looks something like this:
your.badger.module error - not_yet_working() is TODO in
Your::Badger::Module at line 42
You can pass an argument to be more specific about what is still TODO.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Banal/Role/Fallback/Tiny.pm view on Meta::CPAN
my $rt = reftype($f) // '';
@res = grep {
my $gr = $_;
$rt eq 'CODE' and $gr = $f->($_);
$rt eq 'REGEXP' and $gr = m/$f/;
!$rt and $gr = looks_like_number($f) ? ($_ == $f) : ($_ eq "$f");
$gr
}@res;
}
@res = uniq(@res) unless $opt{no_uniq} && !$opt{uniq};
@res = sort @res if $opt{sort};
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/Devel/CheckLib.pm view on Meta::CPAN
It works by trying to compile this:
int main(void) { return 0; }
and linking it to the specified libraries. If something pops out the end
which looks executable, then we know that it worked. That tiny program is
built once for each library that you specify, and (without linking) once
for each header file.
=head1 FUNCTIONS
view all matches for this distribution
view release on metacpan or search on metacpan
docs/BaseLib-example1 view on Meta::CPAN
SH] BEGIN {
SH] for(split/:/,$ENV{PROJLIBDIR}) { use lib $_; }
SH] }
SH]
SH] your scripts can also refuse to run if PROJLIBDIR
SH] is not defined or looks suspicious.
SH]
SH] BEGIN {
SH] for($ENV{PROJLIBDIR}){
SH] croak "PROJLIBDIR is not defined!" unless defined;
SH] ($_)=/(.*)/; # untaint like crazy
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Basket/Calc.pm view on Meta::CPAN
# ABSTRACT: Basket/Cart calculation library with support for currency conversion, discounts and tax
our $VERSION = '0.5'; # VERSION
use Scalar::Util qw(looks_like_number);
use Finance::Currency::Convert::Yahoo;
use Carp;
has 'debug' => (
lib/Basket/Calc.pm view on Meta::CPAN
carp "$key missing";
return;
}
}
unless (looks_like_number($item->{price})) {
carp "'price' is not a number";
return;
}
# calculate amount from quantity and price
if (exists $item->{quantity}) {
if (!looks_like_number($item->{quantity}) || ($item->{quantity} < 0)) {
carp "'quantity' is not a number or smaller than 0";
return;
}
$item->{amount} = $item->{price} * $item->{quantity};
lib/Basket/Calc.pm view on Meta::CPAN
unless ($discount->{type} =~ m/^(percent|amount)$/x) {
carp "'type' has to be either percent, or amount";
return;
}
unless (looks_like_number($discount->{value})) {
carp "'value' is not a number";
return;
}
given ($discount->{type}) {
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Basset/DB/Table.pm view on Meta::CPAN
$table = Basset::DB::Table->new(
'primary_column' => 'id',
'non_primary_columns' => [qw(name age serial_number)],
);
That takes the place of using the definition. It does a discover call behind the scenes, but only looks for the columns
that you've specified, not everything in the table.
=cut
=pod
lib/Basset/DB/Table.pm view on Meta::CPAN
"query_type" is the flag to indicate the type of query. "I" for insert, "U" for update, "D" for delete, "R" for replace,
or "A" for all.
"binds" is a boolean flag, 0 or 1. Set to 0 if you're inserting a new value that doesn't need a binded param, such as "NOW()".
Set it to 1 if you're inserting a new value that does need a binded param, such as "LCASE(?)" to insert the value in lower case.
And voila. When the query is constructed, internally it first looks for a re-write of the method for the given query type. If
it doesn't find one, it looks for a re-write of type "A" (all queries), if it doesn't find one of those, then it just leaves it
alone and preps the query to insert the value in as is, unchanged.
One useful example that I will include, is to make a column read-only:
$table->db_write_translation(
view all matches for this distribution
view release on metacpan or search on metacpan
Batchrun.pm view on Meta::CPAN
use Batch::Batchrun;
blah blah blah
=head1 DESCRIPTION
Stub documentation for Batch::Batchrun was created by h2xs. It looks like the
author of the extension was negligent enough to leave the stub
unedited.
Blah blah blah.
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/Beam/Runner.pm view on Meta::CPAN
#pod
#pod $ beam list
#pod greet
#pod - hello -- My::Runnable::Greeting
#pod
#pod The C<beam list> command looks through our C<BEAM_PATH> directory, opens
#pod all the configuration files it finds, and lists all the
#pod L<Beam::Runnable> objects inside (helpfully giving us the module name for us
#pod to find documentation).
#pod
#pod Then, to run the command, we use C<beam run> and give it the configuration file
lib/Beam/Runner.pm view on Meta::CPAN
$ beam list
greet
- hello -- My::Runnable::Greeting
The C<beam list> command looks through our C<BEAM_PATH> directory, opens
all the configuration files it finds, and lists all the
L<Beam::Runnable> objects inside (helpfully giving us the module name for us
to find documentation).
Then, to run the command, we use C<beam run> and give it the configuration file
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Beam/Wire.pm view on Meta::CPAN
#pod
#pod The raw configuration data. By default, this data is loaded by
#pod L<Config::Any|Config::Any> using the file specified by the L<file attribute|/file>.
#pod
#pod See L<Beam::Wire::Help::Config for details on what the configuration
#pod data structure looks like|Beam::Wire::Help::Config>.
#pod
#pod If you don't want to load a file, you can specify this attribute in the
#pod Beam::Wire constructor.
#pod
#pod =cut
lib/Beam/Wire.pm view on Meta::CPAN
The raw configuration data. By default, this data is loaded by
L<Config::Any|Config::Any> using the file specified by the L<file attribute|/file>.
See L<Beam::Wire::Help::Config for details on what the configuration
data structure looks like|Beam::Wire::Help::Config>.
If you don't want to load a file, you can specify this attribute in the
Beam::Wire constructor.
=head2 services
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Bencher/Formatter/RoundNumbers.pm view on Meta::CPAN
#use Log::Any::IfLOG '$log';
use parent qw(Bencher::Formatter);
use Math::ScientificNotation::Util qw(sci2dec);
use Scalar::Util qw(looks_like_number);
use Role::Tiny::With;
with 'Bencher::Role::ResultMunger';
our $AUTHORITY = 'cpan:PERLANCAR'; # AUTHORITY
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Bencher/Scenario/PerinciSubValidateArgs/Overhead.pm view on Meta::CPAN
C<none>, obviously) all should be in the same order of magnitude because both
L<Data::Sah> and L<Type::Tiny> work by generating Perl code validator and then
compiling (C<eval()>) them then execute the compiled result. The differences are
in the details: how the generated Perl code is structured, what the code for the
type checks are (e.g. checking for number can be done with a regex or
L<Scalar::Util>'s C<looks_like_number()> or L<Scalar::Util::Numeric>, and so
on).
Perinci::Sub::Wrapper (PSW) and Dist::Zilla::Plugin::Rinci::Wrap is slower
because it does more.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Benchmark/DKbench.pm view on Meta::CPAN
=head2 C<suite_run>
my %stats = suite_run(\%options);
Runs the benchmark suite given the C<%options> and prints results. Returns a hash
with run stats that looks like this:
%stats = (
bench_name => {times => [ ... ], scores => [ ... ]},
...
_total => {times => [ ... ], scores => [ ... ]},
lib/Benchmark/DKbench.pm view on Meta::CPAN
Given the C<%stat_single> results of a single-threaded C<suite_run> and C<%stat_multi>
results of a multi-threaded run, will calculate, print and return the multi-thread
scalability (including averages, ranges etc for multiple iterations.
The result hash return looks like this:
%scal = (
bench_name => $bench_avg_scalability,
...
_total => $total_avg_scalability
view all matches for this distribution