# Regenerate (overwriting only if changed):
#
# overload.h
-# overload.c
+# overload.inc
# lib/overload/numbers.pm
#
# from information stored in the DATA section of this file.
push @names, $name;
}
-my $c = safer_open('overload.c-new', 'overload.c');
-my $h = safer_open('overload.h-new', 'overload.h');
-mkdir("lib/overload", 0777) unless -d 'lib/overload';
-my $p = safer_open('lib/overload/numbers.pm-new', 'lib/overload/numbers.pm');
+my ($c, $h) = map {
+ open_new($_, '>',
+ { by => 'regen/overload.pl', file => $_, style => '*',
+ copyright => [1997, 1998, 2000, 2001, 2005 .. 2007, 2011] });
+} 'overload.inc', 'overload.h';
-print $p read_only_top(lang => 'Perl', by => 'regen/overload.pl',
- file => 'lib/overload/numbers.pm', copyright => [2008]);
+mkdir("lib/overload", 0777) unless -d 'lib/overload';
+my $p = open_new('lib/overload/numbers.pm', '>',
+ { by => 'regen/overload.pl',
+ file => 'lib/overload/numbers.pm', copyright => [2008] });
{
local $" = "\n ";
EOF
}
-for ([$c, 'overload.c'], [$h, 'overload.h']) {
- my ($handle, $file) = @$_;
- print $handle read_only_top(lang => 'C', by => 'regen/overload.pl',
- file => $file, style => '*',
- copyright => [1997, 1998, 2000, 2001,
- 2005 .. 2007, 2011]);
-}
-
print $h "enum {\n";
for (0..$#enums) {
rshift_ass (>>=
band (&
band_ass (&=
+sband (&.
+sband_ass (&.=
bor (|
bor_ass (|=
+sbor (|.
+sbor_ass (|.=
bxor (^
bxor_ass (^=
+sbxor (^.
+sbxor_ass (^.=
ncmp (<=>
scmp (cmp
compl (~
+scompl (~.
atan2 (atan2
cos (cos
sin (sin
smart (~~
ftest (-X
regexp (qr
-# Note: Perl_Gv_AMupdate() assumes that DESTROY is the last entry
-DESTROY DESTROY