Data commit

This commit is contained in:
Ingy döt Net 2023-07-01 11:58:00 -04:00
parent 7387c8f97b
commit cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions

View file

@ -0,0 +1,3 @@
require v5.6.1; # run time version check
require 5.6.1; # ditto
require 5.006_001; # ditto; preferred for backwards compatibility

View file

@ -0,0 +1,3 @@
#$bloop = -123; # uncomment this line to see the difference
no strict 'refs'; # referring to variable by name goes against 'strict' pragma
if (defined($::{'bloop'})) {print abs(${'bloop'})} else {print "bloop isn't defined"};

View file

@ -0,0 +1,2 @@
eval('abs(0)'); # eval("") instead of eval{}; the latter is not for run-time check
print "abs() doesn't seem to be available\n" if $@;

View file

@ -0,0 +1,8 @@
use Math::Complex;
my $cpl = Math::Complex->new(1,1);
print "package Math::Complex has 'make' method\n"
if Math::Complex->can('make');
print "object \$cpl does not have 'explode' method\n"
unless $cpl->can('explode');

View file

@ -0,0 +1,13 @@
use 5.010;
our $bloop = -12;
if (defined $::bloop) {
if (eval { abs(1) }) {
say 'abs($bloop) is ' . abs($::bloop);
}
else {
say 'abs() is not available';
}
}
else {
say '$bloop is not defined';
}

View file

@ -0,0 +1,16 @@
use 5.010;
package test;
use Regexp::Common;
use List::Util qw(sum);
our $a = 7;
our $b = 1;
our $c = 2;
our $d = -5;
our $e = 'text';
our $f = 0.25;
my @ints = grep { /^$RE{num}{int}$/ } map { $$_ // '' } values %::test::;
my $num = @ints;
my $sum = sum @ints;
say "$num integers, sum = $sum";

View file

@ -0,0 +1,7 @@
use 5.010;
use Regexp::Common;
use List::Util qw(sum);
my @ints = grep { /^$RE{num}{int}$/ } map { $$_ // '' } values %::;
my $num = @ints;
my $sum = sum @ints;
say "$num integers, sum = $sum";