view release on metacpan or search on metacpan
BEGIN { use_ok "Math::Interpolator::Linear"; }
BEGIN { use_ok "Math::Interpolator::Knot"; }
BEGIN { use_ok "Math::Interpolator::Source"; }
sub pt(@) { Math::Interpolator::Knot->new(@_) }
sub proto(@) { Math::Interpolator::Source->new(@_) }
my $a5_called = 0;
sub a5() {
$a5_called++;
return [ pt(4, 6), pt(6, 7) ];
}
my $ipl;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Math/NumSeq/Expression.pm view on Meta::CPAN
my \$pi = $pi;
my \$e = $e;
my \$phi = (1+sqrt(5))/2;
my \$gam = 0.5772156649015328606065120;
my \$i;
sub i () { return \$i }
sub {
\$i = \$_[0];
return do { $expression }
}
HERE
view all matches for this distribution
view release on metacpan or search on metacpan
$f = eval { loadPari($meth) };
return $f if defined $f;
return;
}
sub O ($;$) {
return PARI("O($_[0]^$_[1])") if @_ == 2;
return PARI("O($_[0])") if typ($_[0]) == 10; # Poly
Carp::croak("O(number**power) not implemented, use O(number,power) instead");
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Math/Vectors2.pm view on Meta::CPAN
sub zeroAndUnits() #S Create the useful vectors: zero=(0,0), x=(1,0), y=(0,1).
{map {&new(@$_)} ([0, 0], [1, 0], [0, 1])
}
sub eq($$) # Whether two vectors are equal to within the accuracy of floating point arithmetic.
{my ($o, $p) = @_; # First vector, second vector
near2($o, $p)
}
sub zero($) # Whether a vector is equal to zero within the accuracy of floating point arithmetic.
lib/Math/Vectors2.pm view on Meta::CPAN
sub l($) # Length of a vector.
{my ($o) = @_; # Vector
sqrt($o->x**2 + $o->y**2)
}
sub l2($) # Length squared of a vector.
{my ($o) = @_; # Vector
$o->x**2 + $o->y**2
}
sub d($$) # Distance between the points identified by two vectors when placed on the same point.
{my ($o, $p) = @_; # Vector 1, vector 2
sqrt(($o->x-$p->x)**2 + ($o->y-$p->y)**2)
}
sub d2($$) # Distance squared between the points identified by two vectors when placed on the same point.
{my ($o, $p) = @_; # Vector 1, vector 2
($o->x-$p->x)**2 + ($o->y-$p->y)**2
}
sub n($) # Return a normalized a copy of a vector.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Math/Zap/Color.pm view on Meta::CPAN
Same as L</check> but return the result to the caller.
=cut
sub is(@)
{for my $t(@_)
{return 0 unless ref($t) eq __PACKAGE__;
}
'color';
}
view all matches for this distribution
view release on metacpan or search on metacpan
is $b, 1;
is_deeply \@b, [];
our $c;
BEGIN { $c = 1; }
sub cc() { lift($c) }
$c = 2;
is cc(), 1;
$c = 3;
is cc(), 1;
view all matches for this distribution
view release on metacpan or search on metacpan
is $b, undef;
is_deeply \@b, [];
our $c;
BEGIN { $c = 1; }
sub cc() { once($c) }
$c = 2;
is cc(), 2;
$c = 3;
is cc(), 2;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Menlo/CLI/Compat.pm view on Meta::CPAN
if ($INC{"App/FatPacker/Trace.pm"}) {
require version::vpp;
}
sub qs($) {
Menlo::Util::shell_quote($_[0]);
}
sub determine_home {
my $class = shift;
view all matches for this distribution
view release on metacpan or search on metacpan
Meta/Pdmt/Listen.pm view on Meta::CPAN
my($self)=@_;
Meta::Utils::Output::print("in here\n");
$self->run();
}
sub cb($) {
my($self)=@_;
$self->quit();
}
sub TEST($) {
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Test/Base.pm view on Meta::CPAN
eval { require Text::Diff; 1 } &&
$Text::Diff::VERSION >= 0.35 &&
$Algorithm::Diff::VERSION >= 1.15;
}
sub is($$;$) {
(my ($self), @_) = find_my_self(@_);
my ($actual, $expected, $name) = @_;
local $Test::Builder::Level = $Test::Builder::Level + 1;
if ($ENV{TEST_SHOW_NO_DIFFS} or
not defined $actual or
view all matches for this distribution
view release on metacpan or search on metacpan
t/p6/basic/if.t view on Meta::CPAN
}
sub c {
say "not ok";
0;
}
sub id($arg) {
$arg;
}
if a() {
say "no ok";
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Test/Base.pm view on Meta::CPAN
eval { require Text::Diff; 1 } &&
$Text::Diff::VERSION >= 0.35 &&
$Algorithm::Diff::VERSION >= 1.15;
}
sub is($$;$) {
(my ($self), @_) = find_my_self(@_);
my ($actual, $expected, $name) = @_;
local $Test::Builder::Level = $Test::Builder::Level + 1;
if ($ENV{TEST_SHOW_NO_DIFFS} or
not defined $actual or
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Test/Base.pm view on Meta::CPAN
eval { require Text::Diff; 1 } &&
$Text::Diff::VERSION >= 0.35 &&
$Algorithm::Diff::VERSION >= 1.15;
}
sub is($$;$) {
(my ($self), @_) = find_my_self(@_);
my ($actual, $expected, $name) = @_;
local $Test::Builder::Level = $Test::Builder::Level + 1;
if ($ENV{TEST_SHOW_NO_DIFFS} or
not defined $actual or
view all matches for this distribution
view release on metacpan or search on metacpan
t/tlib/misc.pm view on Meta::CPAN
sub import {
*{ caller() . '::sysok' } = \&sysok;
}
sub diag($) { goto \&Test::More::diag; }
sub ok($$) { goto \&Test::More::ok; }
use strict;
sub sysok {
my $cmd = shift;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Module/CPANfile.pm view on Meta::CPAN
my $struct = { %{$meta->as_struct}, prereqs => $prereqs_hash };
CPAN::Meta->new($struct)->save($file, { version => $version });
}
sub _d($) {
require Data::Dumper;
chomp(my $value = Data::Dumper->new([$_[0]])->Terse(1)->Dump);
$value;
}
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Test/Base.pm view on Meta::CPAN
$Text::Diff::VERSION >= 0.35 &&
$Algorithm::Diff::VERSION >= 1.15;
}
provides 'is';
sub is($$;$) {
(my ($self), @_) = find_my_self(@_);
my ($actual, $expected, $name) = @_;
local $Test::Builder::Level = $Test::Builder::Level + 1 unless $HAS_PROVIDER;
if ($ENV{TEST_SHOW_NO_DIFFS} or
not defined $actual or
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Test/Base.pm view on Meta::CPAN
eval { require Text::Diff; 1 } &&
$Text::Diff::VERSION >= 0.35 &&
$Algorithm::Diff::VERSION >= 1.15;
}
sub is($$;$) {
(my ($self), @_) = find_my_self(@_);
my ($actual, $expected, $name) = @_;
local $Test::Builder::Level = $Test::Builder::Level + 1;
if ($ENV{TEST_SHOW_NO_DIFFS} or
not defined $actual or
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Test/Base.pm view on Meta::CPAN
eval { require Text::Diff; 1 } &&
$Text::Diff::VERSION >= 0.35 &&
$Algorithm::Diff::VERSION >= 1.15;
}
sub is($$;$) {
(my ($self), @_) = find_my_self(@_);
my ($actual, $expected, $name) = @_;
local $Test::Builder::Level = $Test::Builder::Level + 1;
if ($ENV{TEST_SHOW_NO_DIFFS} or
not defined $actual or
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Test/Base.pm view on Meta::CPAN
eval { require Text::Diff; 1 } &&
$Text::Diff::VERSION >= 0.35 &&
$Algorithm::Diff::VERSION >= 1.15;
}
sub is($$;$) {
(my ($self), @_) = find_my_self(@_);
my ($actual, $expected, $name) = @_;
local $Test::Builder::Level = $Test::Builder::Level + 1;
if ($ENV{TEST_SHOW_NO_DIFFS} or
not defined $actual or
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Test/Base.pm view on Meta::CPAN
eval { require Text::Diff; 1 } &&
$Text::Diff::VERSION >= 0.35 &&
$Algorithm::Diff::VERSION >= 1.15;
}
sub is($$;$) {
(my ($self), @_) = find_my_self(@_);
my ($actual, $expected, $name) = @_;
local $Test::Builder::Level = $Test::Builder::Level + 1;
if ($ENV{TEST_SHOW_NO_DIFFS} or
not defined $actual or
view all matches for this distribution
view release on metacpan or search on metacpan
_Deparsed_XSubs.pm view on Meta::CPAN
sub _login;
sub _pg_type_info;
sub _ping;
sub commit;
sub disconnect;
sub do($$;$@) ;
sub endcopy;
sub getfd;
sub getline;
sub lo_close;
sub lo_creat;
_Deparsed_XSubs.pm view on Meta::CPAN
sub DROP_VIEW() ;
sub DROP_VTABLE() ;
sub FUNCTION() ;
sub IGNORE() ;
sub INSERT() ;
sub OK() ;
sub OPEN_CREATE() ;
sub OPEN_EXRESCODE() ;
sub OPEN_FULLMUTEX() ;
sub OPEN_MEMORY() ;
sub OPEN_NOFOLLOW() ;
_Deparsed_XSubs.pm view on Meta::CPAN
sub fork($) ;
sub fork_ns($) ;
sub idle($) ;
sub idle_ns($) ;
sub invoke_pending() ;
sub io($$$) ;
sub io_ns($$$) ;
sub iteration() ;
sub loop(;$) ;
sub loop_count() ;
sub loop_depth() ;
_Deparsed_XSubs.pm view on Meta::CPAN
sub _active_fields;
sub _fieldhash($$) ;
sub _test_uvar_get;
sub _test_uvar_same;
sub _test_uvar_set;
sub id($) ;
sub id_2obj($) ;
sub register($@) ;
}
package I18N::Langinfo {
sub AUTOLOAD;
view all matches for this distribution
view release on metacpan or search on metacpan
t/rollover.t view on Meta::CPAN
use Test::More;
use Mojo::Asset::Memory;
use Mojo::TFTPd;
use Mojo::Util;
sub d ($) { Mojo::Util::term_escape($_[0]) }
my $tftpd = Mojo::TFTPd->new(retries => 6, retransmit => 1);
my $ROLLOVER = 256 * 256;
our ($RECV, $SEND);
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Mojolicious/Plugin/Vparam/Filters.pm view on Meta::CPAN
return 'Value not defined' unless defined $_[0];
return 'Wrong format' unless $_[0] =~ $_[1];
return 0;
}
sub in($$) {
my ($str, $list) = @_;
die 'Not ArrayRef' unless 'ARRAY' eq ref $list;
return 'Value not defined' unless defined $str;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/MooX/Role/EventEmitter.pm view on Meta::CPAN
Subscribe to an event.
=cut
sub on($self, $name, $cb) {
push @{$self->events->{$name}}, $cb and return $cb
}
=head2 C<< $obj->once $name, @args >>
view all matches for this distribution
view release on metacpan or search on metacpan
lib/MooseX/Has/Sugar.pm view on Meta::CPAN
sub ro() {
return ( 'is', 'ro' );
}
sub rw() {
return ( 'is', 'rw' );
}
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Test/Base.pm view on Meta::CPAN
eval { require Text::Diff; 1 } &&
$Text::Diff::VERSION >= 0.35 &&
$Algorithm::Diff::VERSION >= 1.15;
}
sub is($$;$) {
(my ($self), @_) = find_my_self(@_);
my ($actual, $expected, $name) = @_;
local $Test::Builder::Level = $Test::Builder::Level + 1;
if ($ENV{TEST_SHOW_NO_DIFFS} or
not defined $actual or
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Test/Base.pm view on Meta::CPAN
eval { require Text::Diff; 1 } &&
$Text::Diff::VERSION >= 0.35 &&
$Algorithm::Diff::VERSION >= 1.15;
}
sub is($$;$) {
(my ($self), @_) = find_my_self(@_);
my ($actual, $expected, $name) = @_;
local $Test::Builder::Level = $Test::Builder::Level + 1;
if ($ENV{TEST_SHOW_NO_DIFFS} or
not defined $actual or
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Test/Base.pm view on Meta::CPAN
eval { require Text::Diff; 1 } &&
$Text::Diff::VERSION >= 0.35 &&
$Algorithm::Diff::VERSION >= 1.15;
}
sub is($$;$) {
(my ($self), @_) = find_my_self(@_);
my ($actual, $expected, $name) = @_;
local $Test::Builder::Level = $Test::Builder::Level + 1;
if ($ENV{TEST_SHOW_NO_DIFFS} or
not defined $actual or
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Test/Base.pm view on Meta::CPAN
eval { require Text::Diff; 1 } &&
$Text::Diff::VERSION >= 0.35 &&
$Algorithm::Diff::VERSION >= 1.15;
}
sub is($$;$) {
(my ($self), @_) = find_my_self(@_);
my ($actual, $expected, $name) = @_;
local $Test::Builder::Level = $Test::Builder::Level + 1;
if ($ENV{TEST_SHOW_NO_DIFFS} or
not defined $actual or
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Test/Base.pm view on Meta::CPAN
eval { require Text::Diff; 1 } &&
$Text::Diff::VERSION >= 0.35 &&
$Algorithm::Diff::VERSION >= 1.15;
}
sub is($$;$) {
(my ($self), @_) = find_my_self(@_);
my ($actual, $expected, $name) = @_;
local $Test::Builder::Level = $Test::Builder::Level + 1;
if ($ENV{TEST_SHOW_NO_DIFFS} or
not defined $actual or
view all matches for this distribution