view release on metacpan or search on metacpan
Speed up the next method a little by reducing the number of times it copies its internal
buffer. I've also added a script ('rabin.pl') that demonstrates how to use
Algorithm::RabinKarp with multiple files. Patches welcome and desired.
0.37:
Well, it looks like I messed up the Build.PL file. Making an incremental release to attempt
to make it possible to build using the Build.PL, and also reduce the minimum requirements to
install this module.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Algorithm/RandomPointGenerator.pm view on Meta::CPAN
=head1 THE C<examples> DIRECTORY
Probably the most useful item in the C<examples> directory is the command-line script
C<genRand2D> that can be called simply with two arguments for generating a set of
random points. A call to this script looks like
genRand2D --histfile your_histogram_file.csv --bbfile your_bounding_box_file.csv
where the C<--histfile> option supplies the name of the file that contains a 2D input
histogram and the C<--bbfile> option the name of the file that defines the bounding
view all matches for this distribution
view release on metacpan or search on metacpan
listkids|||
list|||
load_module_nocontext|||vn
load_module||5.006000|v
localize|||
looks_like_bool|||
looks_like_number|||
lop|||
mPUSHi|5.009002||p
mPUSHn|5.009002||p
mPUSHp|5.009002||p
mPUSHu|5.009002||p
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Algorithm/SAT/Backtracking.pm view on Meta::CPAN
# This is an extremely simple implementation of the 'backtracking' algorithm for
# solving boolean satisfiability problems. It contains no optimizations.
# The input consists of a boolean expression in Conjunctive Normal Form.
# This means it looks something like this:
#
# `(blue OR green) AND (green OR NOT yellow)`
#
# We encode this as an array of strings with a `-` in front for negation:
#
lib/Algorithm/SAT/Backtracking.pm view on Meta::CPAN
=head1 METHODS
=head2 solve()
The input consists of a boolean expression in Conjunctive Normal Form.
This means it looks something like this:
`(blue OR green) AND (green OR NOT yellow)`
We encode this as an array of strings with a `-` in front for negation:
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Algorithm/Search.pm view on Meta::CPAN
the list may be empty.
A position is a solution if the "is_solution" function returns true.
A traversal does not require that a solution be found or even looked for.
A search is a traversal that looks for a solution.
A path corresponds to a list of valid moves from the initial position.
The path values correspond to the list of values by the positions
the object moves along the path.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Algorithm/Shape/RandomTree.pm view on Meta::CPAN
has 'nodulation' => ( is => 'ro', isa => 'Int' );
# Ebbing Factor: Determins how quickly the nodulation decreases along the tree
has 'ebbing_factor' => ( is => 'ro', isa => 'Int', default => 2 );
# Creation algorithm: can be either linear or recursive
# Linear gives more control but looks slightly less natural
has 'creation_algorithm' => ( is => 'ro', isa => 'Str', default => 'recursive' );
has 'branches' => (
is => 'ro',
isa => 'ArrayRef',
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Algorithm/SixDegrees.pm view on Meta::CPAN
C<Algorithm::SixDegrees> is a Perl implementation of a breadth-first
search through a set of linked elements in order to find the shortest
possible chain linking two specific elements together.
In simpler terms, this module will take a bunch of related items and
attempt to find a relationship between two of them. It looks for the
shortest (and generally, simplest) relationship it can find.
=head1 CONSTRUCTOR
=head2 new()
view all matches for this distribution
view release on metacpan or search on metacpan
listkids|||
list|||
load_module_nocontext|||vn
load_module|5.006000||pv
localize|||
looks_like_bool|||
looks_like_number|||
lop|||
mPUSHi|5.009002||p
mPUSHn|5.009002||p
mPUSHp|5.009002||p
mPUSHs|5.011000||p
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Algorithm/Step.pm view on Meta::CPAN
Print the execution information. If no argument is give,
print to stdout. If a filename is given, print to that file.
statistics("prime.stat");
The output looks like:
STATISTICS
Algorithm P: Print table of 500 primes
STEP 1. Start table, PRIME[1] <- 2, PRIME[2] <- 3 .... [1]
lib/Algorithm/Step.pm view on Meta::CPAN
=back
=head1 TODO
Generate from comments. If a file `prime.pl' looks like:
...
# algorithm P: Print first five hundred primes
view all matches for this distribution
view release on metacpan or search on metacpan
listkids|||
list|||
load_module_nocontext|||vn
load_module|5.006000||pv
localize|||
looks_like_bool|||
looks_like_number|||
lop|||
mPUSHi|5.009002||p
mPUSHn|5.009002||p
mPUSHp|5.009002||p
mPUSHs|5.011000||p
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Algorithm/TicketClusterer.pm view on Meta::CPAN
common vocabulary. The synonym expansion of a ticket takes place only after
the negated phrases (that is, the words preceded by 'no' or 'not') are
replaced by their antonyms.
Obviously, expanding a ticket by synonyms makes sense only after it is
corrected for spelling and other errors. What sort of errors one looks for
and corrects would, in general, depend on the application domain of the
tickets. (It is not uncommon for engineering services to use jargon words
and acronyms that look like spelling errors to those not familiar with the
services.) The module expects to see a file that is supplied through the
constructor parameter C<misspelled_words_file> that contains misspelled
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Algorithm/ToNumberMunger.pm view on Meta::CPAN
use 5.006;
use strict;
use warnings;
use Carp qw(carp croak);
use Scalar::Util qw(looks_like_number);
=head1 NAME
Algorithm::ToNumberMunger - Compile declarative specs into closures that munge raw values into numbers.
lib/Algorithm/ToNumberMunger.pm view on Meta::CPAN
for my $k ( keys %$map ) {
croak "enum munger$where: map value for '$k' ('"
. ( defined $map->{$k} ? $map->{$k} : 'undef' )
. "') is not numeric"
unless looks_like_number( $map->{$k} );
}
my $has_default = exists $spec->{default};
my $default = $spec->{default};
croak "enum munger$where: 'default' must be numeric"
if $has_default && !looks_like_number($default);
# Copy so a later edit of the caller's spec cannot mutate a live munger.
my %m = %$map;
return sub {
my ($v) = @_;
lib/Algorithm/ToNumberMunger.pm view on Meta::CPAN
for my $k ( keys %$counts ) {
my $c = $counts->{$k};
croak "frozen_freq_map munger$where: count for '$k' ('"
. ( defined $c ? $c : 'undef' )
. "') is not a non-negative number"
unless looks_like_number($c) && $c >= 0;
$sum += $c;
}
my $V = keys %$counts;
carp "frozen_freq_map munger$where: 'counts' has $V keys; a table this large bloats "
. "info.json -- consider the 'hash' munger for unbounded cardinality"
if $V > $FROZEN_FREQ_MAP_WARN_KEYS;
my $total = defined $spec->{total} ? $spec->{total} : $sum;
croak "frozen_freq_map munger$where: 'total' must be numeric"
unless looks_like_number($total);
croak "frozen_freq_map munger$where: 'total' ($total) must be >= sum of counts ($sum)"
if $total < $sum;
my $mode = defined $spec->{mode} ? $spec->{mode} : 'neg_log_prob';
croak "frozen_freq_map munger$where: unknown mode '$mode' (known: " . join( ', ', sort keys %FREQ_MODE ) . ')'
unless $FREQ_MODE{$mode};
my $s = defined $spec->{smoothing} ? $spec->{smoothing} : 1;
croak "frozen_freq_map munger$where: 'smoothing' must be a non-negative number"
unless looks_like_number($s) && $s >= 0;
my $unseen = defined $spec->{unseen} ? $spec->{unseen} : 'rare';
croak "frozen_freq_map munger$where: 'unseen' must be 'rare' or a number"
unless $unseen eq 'rare' || looks_like_number($unseen);
# An unseen value under neg_log_prob has probability s/denom; with no
# smoothing that is 0 and -ln(0) is infinite, which would poison the column.
# Refuse to build rather than emit inf.
croak "frozen_freq_map munger$where: mode 'neg_log_prob' with unseen => 'rare' needs "
lib/Algorithm/ToNumberMunger.pm view on Meta::CPAN
my ( $proto, $lo, $hi, $div, $spec, $where ) = @_;
my $strict = $spec->{strict} ? 1 : 0;
return sub {
my ($v) = @_;
croak "${proto}_enum munger$where: '" . ( defined $v ? $v : 'undef' ) . "' is not a numeric status code"
unless looks_like_number($v);
croak "${proto}_enum munger$where: status code '$v' is out of range " . "($lo-$hi)"
if $strict && ( $v < $lo || $v > $hi );
return int( $v / $div );
};
} ## end sub _status_class_munger
lib/Algorithm/ToNumberMunger.pm view on Meta::CPAN
my ( $spec, $where ) = @_;
my $strict = $spec->{strict} ? 1 : 0;
return sub {
my ($v) = @_;
croak "mgcp_enum munger$where: '" . ( defined $v ? $v : 'undef' ) . "' is not a numeric status code"
unless looks_like_number($v);
croak "mgcp_enum munger$where: status code '$v' is out of range " . "(100-599 or 800-899)"
if $strict && !( ( $v >= 100 && $v <= 599 ) || ( $v >= 800 && $v <= 899 ) );
return int( $v / 100 );
};
} ## end sub _build_mgcp_enum
lib/Algorithm/ToNumberMunger.pm view on Meta::CPAN
my ( $name, $e, $spec, $where ) = @_;
my $has_default = exists $spec->{default};
my $default = $spec->{default};
croak "${name}_enum munger$where: 'default' must be numeric"
if $has_default && !looks_like_number($default);
my ( $map, $numeric ) = @{$e}{qw(map numeric)};
return sub {
my ($v) = @_;
if ( defined $v ) {
return $v + 0 if $numeric && looks_like_number($v);
my $k = lc $v;
return $map->{$k} if exists $map->{$k};
}
return $default if $has_default;
croak "${name}_enum munger$where: no mapping for '" . ( defined $v ? $v : 'undef' ) . "'";
lib/Algorithm/ToNumberMunger.pm view on Meta::CPAN
unless length($g) == $n;
my $c = $counts->{$g};
croak "ngram munger$where: count for '$g' ('"
. ( defined $c ? $c : 'undef' )
. "') is not a non-negative number"
unless looks_like_number($c) && $c >= 0;
$sum += $c;
} ## end for my $g ( keys %$counts )
croak "ngram munger$where: 'counts' keys must be at least 1 character"
unless $n >= 1;
lib/Algorithm/ToNumberMunger.pm view on Meta::CPAN
carp "ngram munger$where: 'counts' has $V keys; a table this large bloats info.json"
if $V > $FROZEN_FREQ_MAP_WARN_KEYS;
my $total = defined $spec->{total} ? $spec->{total} : $sum;
croak "ngram munger$where: 'total' must be numeric"
unless looks_like_number($total);
croak "ngram munger$where: 'total' ($total) must be >= sum of counts ($sum)"
if $total < $sum;
my $s = defined $spec->{smoothing} ? $spec->{smoothing} : 1;
croak "ngram munger$where: 'smoothing' must be a number > 0 "
. '(an unseen gram would otherwise be infinitely surprising)'
unless looks_like_number($s) && $s > 0;
my $fold = exists $spec->{fold_case} ? ( $spec->{fold_case} ? 1 : 0 ) : 1;
# Same smoothed-probability scheme as frozen_freq_map, "unseen" as one extra
# bucket; surprisal precomputed per listed gram.
lib/Algorithm/ToNumberMunger.pm view on Meta::CPAN
croak "count munger$where requires a non-empty 'of' string"
unless defined $of && length $of;
my $plus = defined $spec->{plus} ? $spec->{plus} : 0;
croak "count munger$where: 'plus' must be numeric"
unless looks_like_number($plus);
# index() beats a global regex match here: no pattern engine, and no
# per-call list of matches just to count them. Advancing by length($of)
# keeps the non-overlapping semantics m//g had.
my $oflen = length $of;
lib/Algorithm/ToNumberMunger.pm view on Meta::CPAN
unless ref $bounds eq 'ARRAY' && @$bounds;
my @b = @$bounds;
for my $i ( 0 .. $#b ) {
croak "bucket munger$where: bound[$i] ('" . ( defined $b[$i] ? $b[$i] : 'undef' ) . "') is not numeric"
unless looks_like_number( $b[$i] );
croak "bucket munger$where: 'bounds' must be strictly ascending"
if $i && $b[$i] <= $b[ $i - 1 ];
}
return sub {
my ($v) = @_;
croak "bucket munger$where: '" . ( defined $v ? $v : 'undef' ) . "' is not numeric"
unless looks_like_number($v);
my $idx = 0;
for my $bound (@b) {
last if $v < $bound;
$idx++;
}
lib/Algorithm/ToNumberMunger.pm view on Meta::CPAN
unless ref $bounds eq 'ARRAY' && @$bounds >= 2;
my @b = @$bounds;
for my $i ( 0 .. $#b ) {
croak "quantile munger$where: bound[$i] ('" . ( defined $b[$i] ? $b[$i] : 'undef' ) . "') is not numeric"
unless looks_like_number( $b[$i] );
croak "quantile munger$where: 'bounds' must be strictly ascending"
if $i && $b[$i] <= $b[ $i - 1 ];
}
my $segs = $#b;
return sub {
my ($v) = @_;
croak "quantile munger$where: '" . ( defined $v ? $v : 'undef' ) . "' is not numeric"
unless looks_like_number($v);
return 0 if $v <= $b[0];
return 1 if $v >= $b[-1];
my $i = 0;
$i++ while $v >= $b[ $i + 1 ];
return ( $i + ( $v - $b[$i] ) / ( $b[ $i + 1 ] - $b[$i] ) ) / $segs;
lib/Algorithm/ToNumberMunger.pm view on Meta::CPAN
sub _build_scale {
my ( $spec, $where ) = @_;
my ( $min, $max ) = @{$spec}{qw(min max)};
croak "scale munger$where requires numeric 'min' and 'max'"
unless looks_like_number($min) && looks_like_number($max);
my $range = $max - $min;
croak "scale munger$where: 'min' and 'max' must differ"
if $range == 0;
my $clamp = $spec->{clamp} ? 1 : 0;
return sub {
my ($v) = @_;
croak "scale munger$where: '" . ( defined $v ? $v : 'undef' ) . "' is not numeric"
unless looks_like_number($v);
my $s = ( $v - $min ) / $range;
if ($clamp) { $s = 0 if $s < 0; $s = 1 if $s > 1; }
return $s;
};
} ## end sub _build_scale
lib/Algorithm/ToNumberMunger.pm view on Meta::CPAN
sub _build_zscore {
my ( $spec, $where ) = @_;
my ( $mean, $std ) = @{$spec}{qw(mean std)};
croak "zscore munger$where requires numeric 'mean' and 'std'"
unless looks_like_number($mean) && looks_like_number($std);
croak "zscore munger$where: 'std' must be non-zero"
if $std == 0;
return sub {
my ($v) = @_;
croak "zscore munger$where: '" . ( defined $v ? $v : 'undef' ) . "' is not numeric"
unless looks_like_number($v);
return ( $v - $mean ) / $std;
};
} ## end sub _build_zscore
=head2 log
lib/Algorithm/ToNumberMunger.pm view on Meta::CPAN
sub _build_log {
my ( $spec, $where ) = @_;
my $offset = exists $spec->{offset} ? $spec->{offset} : 0;
croak "log munger$where: 'offset' must be numeric"
unless looks_like_number($offset);
my $ln_base;
if ( defined $spec->{base} ) {
croak "log munger$where: 'base' must be numeric and > 0 and != 1"
unless looks_like_number( $spec->{base} )
&& $spec->{base} > 0
&& $spec->{base} != 1;
$ln_base = log( $spec->{base} );
}
return sub {
my ($v) = @_;
croak "log munger$where: '" . ( defined $v ? $v : 'undef' ) . "' is not numeric"
unless looks_like_number($v);
my $x = $v + $offset;
croak "log munger$where: value+offset must be > 0 (got $x)"
unless $x > 0;
my $r = log($x);
$r /= $ln_base if defined $ln_base;
lib/Algorithm/ToNumberMunger.pm view on Meta::CPAN
my $have_min = defined $min;
my $have_max = defined $max;
croak "clamp munger$where needs at least one of 'min' or 'max'"
unless $have_min || $have_max;
croak "clamp munger$where: 'min' must be numeric"
if $have_min && !looks_like_number($min);
croak "clamp munger$where: 'max' must be numeric"
if $have_max && !looks_like_number($max);
croak "clamp munger$where: 'min' must be <= 'max'"
if $have_min && $have_max && $min > $max;
return sub {
my ($v) = @_;
croak "clamp munger$where: '" . ( defined $v ? $v : 'undef' ) . "' is not numeric"
unless looks_like_number($v);
$v = $min if $have_min && $v < $min;
$v = $max if $have_max && $v > $max;
return $v;
};
} ## end sub _build_clamp
lib/Algorithm/ToNumberMunger.pm view on Meta::CPAN
if ( $base == 10 ) {
return sub {
my ($v) = @_;
croak "num munger$where: '" . ( defined $v ? $v : 'undef' ) . "' is not numeric"
unless looks_like_number($v);
return $v + 0;
};
}
my %digit;
lib/Algorithm/ToNumberMunger.pm view on Meta::CPAN
croak "ratio munger$where takes exactly 2 source fields (numerator, denominator), not $nsrc"
unless $nsrc == 2;
my $zero = defined $spec->{zero} ? $spec->{zero} : 0;
croak "ratio munger$where: 'zero' must be numeric"
unless looks_like_number($zero);
return sub {
for my $v (@_) {
croak "ratio munger$where: '" . ( defined $v ? $v : 'undef' ) . "' is not numeric"
unless looks_like_number($v);
}
return $zero if $_[1] == 0;
return $_[0] / $_[1];
};
} ## end sub _build_ratio
lib/Algorithm/ToNumberMunger.pm view on Meta::CPAN
if $op eq 'diff' && $nsrc != 2;
return sub {
for my $v (@_) {
croak "combine munger$where: '" . ( defined $v ? $v : 'undef' ) . "' is not numeric"
unless looks_like_number($v);
}
return $fold->(@_);
};
} ## end sub _build_combine_op
lib/Algorithm/ToNumberMunger.pm view on Meta::CPAN
my ( $spec, $where ) = @_;
my $has_default = exists $spec->{default};
my $default = $spec->{default};
croak "ip_class munger$where: 'default' must be numeric"
if $has_default && !looks_like_number($default);
return sub {
my ($v) = @_;
my ( $fam, $p ) = _parse_ip( defined $v ? "$v" : '' );
if ($fam) {
lib/Algorithm/ToNumberMunger.pm view on Meta::CPAN
} ## end for my $i ( 0 .. $#$nets )
my $has_default = exists $spec->{default};
my $default = $spec->{default};
croak "cidr munger$where: 'default' must be numeric"
if $has_default && !looks_like_number($default);
return sub {
my ($v) = @_;
my ( $fam, $p ) = _parse_ip( defined $v ? "$v" : '' );
if ($fam) {
lib/Algorithm/ToNumberMunger.pm view on Meta::CPAN
my $mark = exists $spec->{mark} ? ( $spec->{mark} ? 1 : 0 ) : 1;
my $timeout = defined $spec->{timeout} ? $spec->{timeout} : 5;
croak "eps munger$where: 'timeout' must be a positive number"
unless looks_like_number($timeout) && $timeout > 0;
my $on_error = defined $spec->{on_error} ? $spec->{on_error} : 'die';
croak "eps munger$where: 'on_error' must be 'die' or a number"
unless $on_error eq 'die' || looks_like_number($on_error);
return ( $socket, $prefix, $mark, $timeout, $on_error );
} ## end sub _eps_spec
my %EPS_READ = map { $_ => 1 } qw(rate count total);
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Algorithm/Toy/HashSC.pm view on Meta::CPAN
use warnings;
use Carp qw/croak/;
use Moo;
use namespace::clean;
use Scalar::Util qw/looks_like_number/;
our $VERSION = '0.02';
##############################################################################
#
lib/Algorithm/Toy/HashSC.pm view on Meta::CPAN
is => 'rw',
default => sub { 7 },
coerce => sub {
die 'modulus must be a positive integer > 1'
if !defined $_[0]
or !looks_like_number $_[0]
or $_[0] < 2;
return int $_[0];
},
trigger => sub {
my ($self) = @_;
view all matches for this distribution
view release on metacpan or search on metacpan
Algorithm/TrunkClassifier/ppport.h view on Meta::CPAN
listkids|||
list|||
load_module_nocontext|||vn
load_module|5.006000||pv
localize|||
looks_like_bool|||
looks_like_number|||
lop|||
mPUSHi|5.009002||p
mPUSHn|5.009002||p
mPUSHp|5.009002||p
mPUSHu|5.009002||p
view all matches for this distribution
view release on metacpan or search on metacpan
examples/calculate_precision_and_recall_from_file_based_relevancies_for_LSA.pl view on Meta::CPAN
#!/usr/bin/perl -w
## calculate_precision_and_recall_from_file_based_relevancies_for_LSA.pl
## This script looks for human-supplied relevancy judgments in a file called
## `relevancy.txt' for the queries in the file `test_queries.txt'
## See Item 10 of the README of the `examples' directory for further information.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Algorithm/Voting/Sortition.pm view on Meta::CPAN
package Algorithm::Voting::Sortition;
use strict;
use warnings;
use Scalar::Util qw/reftype looks_like_number/;
use Digest::MD5;
use Math::BigInt;
use Params::Validate 'validate';
use base 'Class::Accessor::Fast';
lib/Algorithm/Voting/Sortition.pm view on Meta::CPAN
=head2 $class->_sort(@items)
Returns a list containing the values of C<@items>, but sorted. Sorts
numerically if C<@items> contains only numbers (according to
C<Scalar::Util::looks_like_number()>), otherwise sorts lexically.
=cut
sub _sort {
my ($class, @items) = @_;
if (grep { !looks_like_number($_) } @items) {
return sort @items;
}
else {
return sort { $a <=> $b } @items;
}
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/Alien/Autotools.pm view on Meta::CPAN
use Alien::Autotools qw(autoconf_dir);
print autoconf_dir(), "\n";
=head1 DESCRIPTION
This module looks for minimum versions of the tools that make up the "GNU build
system": version 2.68 of C<autoconf>, version 1.11.0 of C<automake>, and version
2.4.0 of C<libtool>. For each tool that is not found or below the minimum
version, it is downloaded, compiled and installed it to the B<Alien-Autotools>
distribution's shared directory. Compilation can be made to happen regardless
of whether minimum versions are already found by setting the environment
view all matches for this distribution
view release on metacpan or search on metacpan
corpus/libpalindrome/configure 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
corpus/libpalindrome/configure view on Meta::CPAN
lt_prog_compiler_pic='-fPIC'
lt_prog_compiler_static='-static'
;;
pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
# Portland Group compilers (*not* the Pentium gcc compiler,
# which looks to be a dead project)
lt_prog_compiler_wl='-Wl,'
lt_prog_compiler_pic='-fpic'
lt_prog_compiler_static='-Bstatic'
;;
ccc*)
corpus/libpalindrome/configure view on Meta::CPAN
# Convert to MSYS style.
sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'`
;;
cygwin*)
# Convert to unix form, then to dos form, then back to unix form
# but this time dos style (no spaces!) so that the unix form looks
# like /cygdrive/c/PROGRA~1:/cygdr...
sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
;;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Alien/Base/ModuleBuild.pm view on Meta::CPAN
if (! $version && ! $pc_version) {
print STDERR "If you are the author of this Alien dist, you may need to provide a an\n";
print STDERR "alien_check_built_version method for your Alien::Base::ModuleBuild\n";
print STDERR "class. See:\n";
print STDERR "https://metacpan.org/pod/Alien::Base::ModuleBuild#alien_check_built_version\n";
carp "Library looks like it installed, but no version was determined";
$self->config_data( version => 0 );
return
}
if ( $version and $pc_version and versioncmp($version, $pc_version)) {
lib/Alien/Base/ModuleBuild.pm view on Meta::CPAN
When this method is called, the current working directory will be the
build root.
If you see an error message like this:
Library looks like it installed, but no version was determined
After the package is built from source code then you probably need to
provide an implementation for this method.
=head2 alien_extract_archive
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Alien/Build/Interpolate/Default.pm view on Meta::CPAN
return $my_make = $perl_make;
}
}
# if we see something that looks like it might be gmake, use that.
foreach my $try (qw( gmake mingw32-make ))
{
return $my_make = $try if which $try;
}
lib/Alien/Build/Interpolate/Default.pm view on Meta::CPAN
{
return $my_make = 'make';
}
}
# if we see something that looks like it might be nmake, use that.
foreach my $try (qw( nmake ))
{
return $my_make = $try if which $try;
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/DBD/SQLite/BundledExtensions.pm view on Meta::CPAN
set to NULL. This means that it is not possible to do a CREATE VIRTUAL
TABLE command with "generate_series" as the USING argument. Instead, there
is a single generate_series virtual table that is always available without
having to be created first.
The xBestIndex method looks for equality constraints against the hidden
start, stop, and step columns, and if present, it uses those constraints
to bound the sequence of generated values. If the equality constraints
are missing, it uses 0 for start, 4294967295 for stop, and 1 for step.
xBestIndex returns a small cost when both start and stop are available,
and a very large cost if either start or stop are unavailable. This
view all matches for this distribution
view release on metacpan or search on metacpan
# straightforward way out of the dilemma is to force the libraries to be
# installed in a lib path (if available) that is in the pkg-config
# default path.
#
# Also, we need to ensure we stick the .pc files for this installation
# into a place where pkg-config looks by defauls, so that it will find
# them. So try some heuristics here.
my $first_lib64 = "";
my $first_lib = "";
my $first_share_pc = "";
view all matches for this distribution
view release on metacpan or search on metacpan
src/Source/LibJPEG/jdinput.c view on Meta::CPAN
* The JPEG spec prohibits the encoder from changing the contents of a Q-table
* slot between scans of a component using that slot. If the encoder does so
* anyway, this decoder will simply use the Q-table values that were current
* at the start of the first scan for the component.
*
* The decompressor output side looks only at the saved quant tables,
* not at the current Q-table slots.
*/
LOCAL(void)
latch_quant_tables (j_decompress_ptr cinfo)
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Alien/GMP.pm view on Meta::CPAN
my $inc_dir = Alien::GMP::inc_dir();
my $lib_dir = Alien::GMP::lib_dir();
=head1 DESCRIPTION
This module looks for version 5.0.0 or greater of the GNU Multiple Precision
(GMP) library. If not found, the builder script downloads, compiles, and
installs it to the B<Alien-GMP> distribution's shared directory. Compilation can
be made to happen regardless of whether GMP is already found by setting the
environment variable, C<COMPILE_ALIEN_GMP>, to a true value.
view all matches for this distribution
view release on metacpan or search on metacpan
t/01-vars.t view on Meta::CPAN
ok (length ($exec), 'executable path not empty');
my $version = $Alien::Gnuplot::version;
ok (defined $version, 'version defined');
ok (length ($version), 'version not empty');
like ($version, qr/^[\d.]+$/, 'version looks like version string');
my $pl = $Alien::Gnuplot::pl;
ok (defined $pl, 'patch level defined');
ok (length ($pl), 'patch level not empty');
like ($pl, qr/^\d+$/, 'patch level looks like patch level string');
my @terms = @Alien::Gnuplot::terms;
ok (scalar @terms, 'terms not empty');
my %terms = %Alien::Gnuplot::terms;
view all matches for this distribution
view release on metacpan or search on metacpan
doc/html/Form.html view on Meta::CPAN
<pre> var tree = GvaScript.Form.to_tree(form);</pre>
<p>Inspects the contents of all fields in <code>form</code> and
returns a data tree, were dotted names in form names
are expanded into sub-arrays or sub-hashes. So for example
if the form looks like</p>
<pre> <input name="father.firstname"> <input name="father.lastname"><br>
<input name="mother.firstname"> <input name="mother.lastname"><br>
<div repeat="child" repeat-start="1">
<input name="#{child.path}.firstname"><br>
</div></pre>
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
inc/My/Judy/Builder.pm view on Meta::CPAN
_chdir_back();
return 0;
};
# "Install" a minor copy of Judy.h and libJudy.so to my own
# blib/arch/Alien/Judy because it looks like some CPAN smokers
# don't install dependencies but just adjust @INC to point
# into depended-on- blib/* directories.
my $alien = File::Spec->catdir( $Orig_CWD, 'blib', 'arch', 'Alien', 'Judy' );
File::Path::make_path( $alien );
my @files = (
view all matches for this distribution