DBomb
view release on metacpan or search on metacpan
dbomb-regen view on Meta::CPAN
gen_decl(\$outbuf, %args);
if(not defined skip_until($lines, qr/^\s*##-#\s*dbomb-gen:end-decls\b/)){
fail($f,"begin-decls with no end-decls. Aborting.");
}
next;
};
$outbuf .= $x;
}
## now make a backup of the original.
my $b = "$f.bak";
for (my $i=1; -f $b ; ++$i){
$b = "$f.bak$i";
}
if (!File::Copy::copy($f, $b)){
fail("could not create backup file", $!, "aborting.");
}
## Overwrite original file.
open OUT, "> $f" or fail("Could open file for writing", $!, $f);
print OUT $outbuf;
close OUT;
}
sub gen_decl {
my ($outbufref, %args) = @_;
( run in 1.336 second using v1.01-cache-2.11-cpan-49f99fa48dc )