view release on metacpan or search on metacpan
inc/bin/patch view on Meta::CPAN
}
}
my ($in, $out);
# Create backup file. I have no clue what Plan A is really supposed to be.
if ($self->{check}) {
$self->note("Checking patch against file $orig using Plan C...\n");
($in, $out) = ($orig, '');
} elsif (defined $self->{output}) {
$self->note("Patching file $orig using Plan T...\n");
local $_ = $self->{output};
$self->skip if -e && not rename $_, $self->backup($_) and
$self->{force} || $self->{batch} || prompt (
'Failed to backup output file--skip this patch? [n] '
) =~ /^[yY]/;
($in, $out) = ($orig, $self->{output});
} else {
$self->note("Patching file $orig using Plan A...\n");
my $back = $self->backup($orig);
if (rename $orig, $back) {
($in, $out) = ($back, $orig);
} else {
$self->skip unless $self->{force} || $self->{batch} or prompt (
'Failed to backup original file--skip this patch? [n] '
) !~ /^[yY]/;
($in, $out) = ($orig, $orig);
}
}
inc/bin/patch view on Meta::CPAN
}
$path;
}
# Create a backup file from options.
sub backup {
my ($self, $file) = @_;
$file =
$self->{prefix} ? "$self->{prefix}$file" :
$self->{'version-control'} ? $self->version_control_backup(
$file, $self->{'version-control'}) :
$self->{suffix} ? "$file$self->{suffix}" :
$ENV{VERSION_CONTROL} ? $self->version_control_backup(
$file, $ENV{VERSION_CONTROL}) :
$ENV{SIMPLE_BACKUP_SUFFIX} ? "$file$ENV{SIMPLE_BACKUP_SUFFIX}" :
"$file.orig"; # long filename
my ($name, $extension) = $file =~ /^(.+)(?:\.([^.]+))?$/;
my $ext = $extension;
while (-e $file) {
if ($ext !~ s/[a-z]/\U$1/) {
$ext = $extension;
$name =~ s/.// or die "Couldn't create a good backup filename.\n";
}
$file = $name . $ext;
}
$file;
}
# Create a backup file using version control.
sub version_control_backup {
my ($self, $file, $version) = @_;
if ($version =~ /^(?:ne|s)/) { # never|simple
$file .= $self->suffix_backup;
} else {
opendir DIR, '.' or die "Can't open dir '.': $!";
my $re = qr/^\Q$file\E\.~(\d+)~$/;
my @files = map /$re/, readdir DIR;
close DIR;
if (@files) { # version number already exists
my $next = 1 + (sort {$a <=> $b} @files)[-1];
$file .= ".~$next~";
} else { # t|numbered # nil|existing
$file .= $version =~ /^(?:t|nu)/ ? '.~1~' : $self->suffix_backup;
}
}
$file;
}
# Create a backup file using suffix.
sub suffix_backup {
my $self = shift;
return $self->{suffix} if $self->{suffix};
return $ENV{SIMPLE_BACKUP_SUFFIX} if $ENV{SIMPLE_BACKUP_SUFFIX};
return '.orig';
}
inc/bin/patch view on Meta::CPAN
a patched version. By default, the patched version is put
in place of the original, with the original file backed up
to the same name with the extension ".orig" [see L<"note 1">],
or as specified
by the B<-b>, B<-B>, or B<-V> switches. The extension used for
making backup files may also be specified in the B<SIMPLE>I<_>B<BACKUP>I<_>B<SUFFIX> environment variable, which is overridden by above switches.
If the backup file already exists, B<patch> creates a new
backup file name by changing the first lowercase letter in
the last component of the file's name into uppercase. If
there are no more lowercase letters in the name, it
removes the first character from the name. It repeats
this process until it comes up with a backup file that
does not already exist.
You may also specify where you want the output to go with
a B<-o> switch; if that file already exists, it is backed up
first.
inc/bin/patch view on Meta::CPAN
=over
=item -b or --suffix
causes the next argument to be interpreted as the
backup extension, to be used in place of ".orig" [see L<"note 1">].
=item -B or --prefix
causes the next argument to be interpreted as a prefix to the backup file name. If this argument is
specified any argument from -b will be ignored.
=item -c or --context
forces I<patch> to interpret the patch file as a context
inc/bin/patch view on Meta::CPAN
patch level.
=item -V or --version-control
causes the next argument to be interpreted as a
method for creating backup file names. The type of
backups made can also be given in the B<VERSION>I<_>B<CONTROL>
environment variable, which is overridden by this
option. The B<-B> option overrides this option, causing
the prefix to always be used for making backup file
names. The value of the B<VERSION>I<_>B<CONTROL> environment
variable and the argument to the B<-V> option are like
the GNU Emacs `version-control' variable; they also
recognize synonyms that are more descriptive. The
valid values are (unique abbreviations are accepted):
=over
=item `t' or `numbered'
Always make numbered backups.
=item `nil' or `existing'
Make numbered backups of files that already
have them, simple backups of the others. This
is the default.
=item `never' or `simple'
Always make simple backups.
=back
=item -xnumber or --debug number
inc/bin/patch view on Meta::CPAN
=back
=head1 ENVIRONMENT
B<SIMPLE>I<_>B<BACKUP>I<_>B<SUFFIX>
Extension to use for backup file names instead of
".orig" or "~".
B<VERSION>I<_>B<CONTROL>
Selects when numbered backup files are made.
=head1 SEE ALSO
diff(1), ed(1)
inc/bin/patch view on Meta::CPAN
documentation for GNU patch version 2.1:
=head2 note 1
On systems that do not support long filenames,
GNU patch uses the extension "~" for backup files and the extension "#" for
reject files.
How to know if a system support long filenames?
=head2 note 2
view all matches for this distribution
view release on metacpan or search on metacpan
MANIFEST.SKIP view on Meta::CPAN
\b_alien/
# Travis
^\.travis\.yml$
# Avoid temp and backup files.
~$
\.old$
\#$
\b\.#
\.bak$
view all matches for this distribution
view release on metacpan or search on metacpan
MANIFEST.SKIP view on Meta::CPAN
# Module::Build-generated files and dirs
^_build
^Build$
# Temp, old, and emacs backup files
~$
\.old$
^#.*#$
^\.#
\.bak$
view all matches for this distribution
view release on metacpan or search on metacpan
script/applypatch view on Meta::CPAN
Force continuation of the patch process even when corruption or
verification errors are detected. This is very dangerous!
=item B<-retain>
Do not remove patch backup files (with extension C<.orig>) upon
completion.
=item B<-patch> I<cmd>
The patch command to be used. Default is "C<patch -p0 -N>".
view all matches for this distribution
view release on metacpan or search on metacpan
lib/CWB/CEQL/Parser.pm view on Meta::CPAN
arbitrary data structure such as a parse tree for I<$input>) just as B<Call>
would. If parsing fails, B<Try> does not abort but simply returns B<undef>,
ignoring any error messages generated during the attempt. In addition, the
call stack is restored and all parameters are reset to their previous values,
so that parsing can continue as if nothing had happened (note, however, that
this is based on flat backup copies, so complex data structures may have been
altered destructively).
=cut
sub Try {
lib/CWB/CEQL/Parser.pm view on Meta::CPAN
unless @_ == 3;
my ($self, $rule, $input) = @_;
confess "Sorry, we're not parsing yet"
unless defined $self->{INPUT};
## make flat backup copies of important data structures and ensure they are restored upon return
## (this is not completely safe, but should undo most changes that a failed parse may have made)
my $back_param = [ @{$self->{PARAM}} ];
my $back_callstack = [ @{$self->{CALLSTACK}} ];
my ($back_groups, $back_current_group, $back_groupstack) = (undef, undef, undef);
if (defined $self->{GROUPS}) {
lib/CWB/CEQL/Parser.pm view on Meta::CPAN
$back_groupstack = [ @{$self->{GROUPSTACK}} ];
}
my $result = eval { $self->Call($rule, $input) };
## if parsing failed, restore internal data structures from backup copies
if (not defined $result) {
$self->{PARAM} = $back_param;
$self->{CALLSTACK} = $back_callstack;
$self->{GROUPS} = $back_groups;
if (defined $back_groups and defined $back_current_group) {
view all matches for this distribution
view release on metacpan or search on metacpan
av_top_index|5.017009|5.003007|p
av_top_index_skip_len_mg|5.025010||Viu
av_undef|5.003007|5.003007|
av_unshift|5.003007|5.003007|
ax|5.003007|5.003007|
backup_one_GCB|5.025003||Viu
backup_one_LB|5.023007||Viu
backup_one_SB|5.021009||Viu
backup_one_WB|5.021009||Viu
bad_type_gv|5.019002||Viu
bad_type_pv|5.016000||Viu
BADVERSION|5.011004||Viu
BASEOP|5.003007||Viu
BhkDISABLE|5.013003||xV
view all matches for this distribution
view release on metacpan or search on metacpan
MANIFEST.SKIP view on Meta::CPAN
# Avoid Module::Build generated and utility files.
\bBuild$
\b_build/
# Avoid temp and backup files.
~$
\.old$
\#$
\b\.#
\.bak$
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Alzabo/BackCompat.pm view on Meta::CPAN
foreach my $file ( glob("$dir/*.alz"),
glob("$dir/*.rdbms"),
glob("$dir/*.version") )
{
my $backup = "$file.bak.v$p{version}";
copy($file, $backup);
}
my $fh = do { local *FH; *FH };
open $fh, "<$c_file"
or Alzabo::Exception::System->throw( error => "Unable to open $c_file: $!" );
view all matches for this distribution
view release on metacpan or search on metacpan
MANIFEST.SKIP view on Meta::CPAN
\bbuild.com$
# Avoid Devel::Cover generated files
\bcover_db
# Avoid temp and backup files.
~$
\.tmp$
\.old$
\.bak$
\#$
view all matches for this distribution
view release on metacpan or search on metacpan
t/02_signer_v2.t view on Meta::CPAN
diag "test Amazon example upload";
my $verb = "PUT";
my $date = "Tue, 27 Mar 2007 21:06:08 +0000";
# TODO: ports should be stripped from the path for signing
# my $path = "static.johnsmith.net:8080/db-backup.dat.gz";
my $path = "static.johnsmith.net/db-backup.dat.gz";
my $user_agent = "curl/7.15.5";
my $x_amz_acl = "public-read";
my $content_type = "application/x-download";
my $content_md5 = "4gJE4saaMU4BqNR0kLY+lw==";
my @x_amz_meta_reviewed_by = ('joe@johnsmith.net', 'jane@johnsmith.net');
t/02_signer_v2.t view on Meta::CPAN
my $x_amz_meta_checksum_algorithm = 'crc32';
my $content_disposition = "attachment; filename=database.dat";
my $content_encoding = "gzip";
my $content_length = 5913339;
my $string_to_sign = "PUT\n4gJE4saaMU4BqNR0kLY+lw==\napplication/x-download\nTue, 27 Mar 2007 21:06:08 +0000\nx-amz-acl:public-read\nx-amz-meta-checksumalgorithm:crc32\nx-amz-meta-filechecksum:0x02661779\nx-amz-meta-reviewedby:joe\@johnsmith.net,...
my $signer = Amazon::S3::Thin::Signer::V2->new($credentials);
my $hdr = HTTP::Headers->new;
$hdr->header("Date", $date);
$hdr->header("User-Agent", $user_agent);
view all matches for this distribution
view release on metacpan or search on metacpan
bin/amberdb_backup.pl view on Meta::CPAN
#!/usr/bin/perl
# bin/amberdb_backup.pl - Native Archive & Disaster Recovery Utility for AmberDB
# Creates (.dump) and restores (.restore) portable, compressed .amberdb archives.
use 5.016;
use strict;
use warnings;
bin/amberdb_backup.pl view on Meta::CPAN
sub usage {
my ($exit_code) = @_;
print <<"USAGE";
Usage:
perl bin/amberdb_backup.pl --dump [--file <outfile.amberdb>] [--tables <t1,t2>] [--dbase <dir>]
perl bin/amberdb_backup.pl --restore --file <archive.amberdb> [--force] [--no-reindex] [--tables <t1,t2>] [--dbase <dir>]
Actions:
-d, --dump Create a portable, compressed .amberdb archive of the database
-r, --restore Restore a .amberdb archive into the target database directory
bin/amberdb_backup.pl view on Meta::CPAN
--force Allow restore to overwrite existing data in a non-empty target directory
--no-reindex Skip automated index reconstruction during restore
-h, --help Display this help message
Examples:
# Dump all tables to default location (backup/YYYY/amberdb_YYYY-MM-DD_time.amberdb):
perl bin/amberdb_backup.pl --dump
# Dump specific tables to custom file:
perl bin/amberdb_backup.pl --dump --file backup/catalog.amberdb --tables products,categories
# Restore backup archive into fresh or staging directory:
perl bin/amberdb_backup.pl --restore --file backup/catalog.amberdb --dbase dbstore_staging
# Force restore over existing database:
perl bin/amberdb_backup.pl --restore --file backup/catalog.amberdb --force
USAGE
exit($exit_code);
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Ambrosia/Context.pm view on Meta::CPAN
my $self = shift;
$self->__error = join( '; ', @_ ) if @_;
return $self->__error;
}
sub backup_uri
{
my $self = shift;
$self->host_path . '?action=' . $self->action . '&' . join '&', map {$_ . '=' . $self->param($_) } grep {defined $_} @{$self->param()};
}
view all matches for this distribution
view release on metacpan or search on metacpan
Amethyst/Brain/Infobot/Module/Excuse.pm view on Meta::CPAN
SIMM crosstalk.
IRQ dropout
Collapsed Backbone
Power company testing new voltage spike (creation) equipment
operators on strike due to broken coffee machine
backup tape overwritten with copy of system manager's favourite CD
UPS interrupted the server's power
The electrician didn't know what the yellow cable was so he yanked the ethernet out.
The keyboard isn't plugged in
The air conditioning water supply pipe ruptured over the machine room
The electricity substation in the car park blew up.
Amethyst/Brain/Infobot/Module/Excuse.pm view on Meta::CPAN
Change your language to Finnish.
Flourescent lights are generating negative ions. If turning them off doesn't work, take them out and put tin foil on the ends.
High nuclear activity in your area.
What office are you in? Oh, that one. Did you know that your building was built over the universities first nuclear research site? And wow, aren't you the lucky one, your office is right over where the core is buried!
The MGs ran out of gas.
The UPS doesn't have a battery backup.
Recursivity. Call back if it happens again.
Someone thought The Big Red Button was a light switch.
The mainframe needs to rest. It's getting old, you know.
I'm not sure. Try calling the Internet's head office -- it's in the book.
The lines are all busy (busied out, that is -- why let them in to begin with?).
Amethyst/Brain/Infobot/Module/Excuse.pm view on Meta::CPAN
Root name servers corrupted.
Budget cuts forced us to sell all the power cords for the servers.
Someone hooked the twisted pair wires into the answering machine.
Operators killed by year 2000 bug bite.
We've picked COBOL as the language of choice.
Operators killed when huge stack of backup tapes fell over.
Robotic tape changer mistook operator's tie for a backup tape.
Someone was smoking in the computer room and set off the halon systems.
Your processor has taken a ride to Heaven's Gate on the UFO behind Hale-Bopp's comet.
t's an ID-10-T error
Dyslexics retyping hosts file on servers
The Internet is being scanned for viruses.
view all matches for this distribution
view release on metacpan or search on metacpan
Compiler/parser.c view on Meta::CPAN
do \
if (amd_yychar == YYEMPTY && amd_yylen == 1) \
{ amd_yychar = (token), amd_yylval = (value); \
amd_yychar1 = YYTRANSLATE (amd_yychar); \
YYPOPSTACK; \
goto amd_yybackup; \
} \
else \
{ amd_yyerror ("syntax error: cannot back up"); YYERROR; } \
while (0)
Compiler/parser.c view on Meta::CPAN
#if YYDEBUG != 0
if (amd_yydebug)
fprintf(stderr, "Entering state %d\n", amd_yystate);
#endif
goto amd_yybackup;
amd_yybackup:
/* Do appropriate processing given the current state. */
/* Read a lookahead token if we need one and don't already have one. */
/* amd_yyresume: */
view all matches for this distribution
view release on metacpan or search on metacpan
xs/const/ppport.h view on Meta::CPAN
av_top_index|5.017009|5.003007|p
av_top_index_skip_len_mg|5.025010||Viu
av_undef|5.003007|5.003007|
av_unshift|5.003007|5.003007|
ax|5.003007|5.003007|
backup_one_GCB|5.025003||Viu
backup_one_LB|5.023007||Viu
backup_one_SB|5.021009||Viu
backup_one_WB|5.021009||Viu
bad_type_gv|5.019002||Viu
bad_type_pv|5.016000||Viu
BADVERSION|5.011004||Viu
BASEOP|5.003007||Viu
BhkDISABLE|5.013003||xV
view all matches for this distribution
view release on metacpan or search on metacpan
tt/news.html view on Meta::CPAN
<ul>
<li><b>2005-07-24</b> - Integrated average ratings from CPANRatings; added new distributions RSS feed.</li>
<li><b>2005-07-21</b> - [% link_dist_name('AnnoCPAN-Perldoc') %] released.</li>
<li><b>2005-07-15</b> - New feature: <a href="/faq#pod">notes can be formatted using POD</a>.</li>
<li><b>2005-07-12</b> - <a href="/dist/AnnoCPAN-0.21">AnnoCPAN-0.21</a> released. New features include note navigation, note counts, and several bug fixes.</li>
<li><b>2005-07-11</b> - The server went down; we are temporarily hosted at an alternate location from the latest backup. Sadly, the user preferences got misplaced in the process.</li>
<li><b>2005-07-01</b> - New feature: <a href="/faq#rss">RSS feeds by PAUSE ID</a></li>
<li><b>2005-06-30</b> - AnnoCPAN article published in <a href="http://perl.com/pub/a/2005/06/30/annocpan.html">perl.com</a></li>
<li><b>2005-06-29</b> - AnnoCPAN is announced to the world during <a href="http://wiki.yapctoronto.org/">YAPC::NA::2005</a></li>
</ul>
view all matches for this distribution
view release on metacpan or search on metacpan
MANIFEST.SKIP view on Meta::CPAN
\bbuild.com$
# and Module::Build::Tiny generated files
\b_build_params$
# Avoid temp and backup files.
~$
\.old$
\#$
\b\.#
\.bak$
view all matches for this distribution
view release on metacpan or search on metacpan
MANIFEST.SKIP view on Meta::CPAN
# Avoid Module::Build generated and utility files.
\bBuild$
\b_build/
# Avoid temp and backup files.
~$
\.old$
\#$
\b\.#
\.bak$
view all matches for this distribution
view release on metacpan or search on metacpan
lib/AnyData.pm view on Meta::CPAN
#print "PACKING";
my $bak_file = $self->{storage}->get_file_name . '.bak';
my $bak = adTable( 'Text', $bak_file, 'o' );
my $bak_fh = $bak->{storage}->get_file_handle;
my $fh = $self->{storage}->get_file_handle;
die "Can't pack to backup $!" unless $fh and $bak_fh;
# $self->seek_first_record;
$fh->seek(0,0) || die $!;
#$bak_fh->seek(0,0) || die $!;
# while (my $line = $self->get_record) {
# next if $self->is_deleted($line);
view all matches for this distribution
view release on metacpan or search on metacpan
MANIFEST.SKIP view on Meta::CPAN
# Avoid Module::Build generated and utility files.
\bBuild$
\b_build/
# Avoid temp and backup files.
~$
\.old$
\#$
\b\.#
\.bak$
view all matches for this distribution
view release on metacpan or search on metacpan
lib/AnyEvent/CouchDB.pm view on Meta::CPAN
B<continuous> option to true.
B<Examples>:
# local to local
$couch->replicate('local_db', 'local_db_backup')->recv;
# local to remote
$couch->replicate('local_db', 'http://elsewhere/remote_db')->recv
# remote to local
view all matches for this distribution
view release on metacpan or search on metacpan
MANIFEST.SKIP view on Meta::CPAN
# Avoid Module::Build generated and utility files.
\bBuild$
\b_build/
# Avoid temp and backup files.
~$
\.old$
\#$
\b\.#
\.bak$
view all matches for this distribution
view release on metacpan or search on metacpan
MANIFEST.SKIP view on Meta::CPAN
\btmon.out$
# Avoid Devel::NYTProf generated files
\bnytprof
# Avoid temp and backup files.
~$
\.tmp$
\.old$
\.bak$
\#$
view all matches for this distribution
view release on metacpan or search on metacpan
FDpasser.xs view on Meta::CPAN
static int _fdpasser_server(char *path) {
int fds[2];
int filefd;
int rv;
int backup_errno;
unlink(path);
filefd = creat(path, S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH);
if (filefd < 0) {
return -1;
FDpasser.xs view on Meta::CPAN
rv = pipe(fds);
if (rv < 0) return -1;
rv = ioctl(fds[1], I_PUSH, "connld");
if (rv != 0) {
backup_errno = errno;
close(fds[0]);
close(fds[1]);
errno = backup_errno;
return -1;
}
rv = fattach(fds[1], path);
if (rv < 0) {
backup_errno = errno;
close(fds[0]);
close(fds[1]);
errno = backup_errno;
return -1;
}
return fds[0];
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/AnyEvent/GnuPG.pm view on Meta::CPAN
_eq('plaintext_length') && do { last };
_eq('sig_subpacket') && do { last };
_eq('sc_op_failure')
&& do { die "smartcard failure ($arg)" };
_eq('sc_op_success') && do { last };
_eq('backup_key_created') && do { last };
_eq('mountpoint') && do { last };
AE::log note => "unknown command: $cmd";
}
my $result;
if ( $actions{ lc($cmd) } ) {
view all matches for this distribution
view release on metacpan or search on metacpan
MANIFEST.SKIP view on Meta::CPAN
# Avoid Module::Build generated and utility files.
\bBuild$
\b_build/
# Avoid temp and backup files.
~$
\.old$
\#$
\b\.#
\.bak$
view all matches for this distribution
view release on metacpan or search on metacpan
MANIFEST.SKIP view on Meta::CPAN
# Avoid Module::Build generated and utility files.
\bBuild$
\b_build/
# Avoid temp and backup files.
~$
\.old$
\#$
\b\.#
\.bak$
view all matches for this distribution
view release on metacpan or search on metacpan
MANIFEST.SKIP view on Meta::CPAN
# Avoid Module::Build generated and utility files.
\bBuild$
\b_build/
# Avoid temp and backup files.
~$
\.old$
\#$
\b\.#
\.bak$
view all matches for this distribution
view release on metacpan or search on metacpan
lib/AnyEvent/Net/Amazon/S3.pm view on Meta::CPAN
foreach my $bucket ( @{ $response->{buckets} } ) {
print "You have a bucket: " . $bucket->bucket . "\n";
}
# create a new bucket
my $bucketname = 'acmes_photo_backups';
my $bucket = $s3->add_bucket( { bucket => $bucketname } )
or die $s3->err . ": " . $s3->errstr;
# or use an existing bucket
$bucket = $s3->bucket($bucketname);
lib/AnyEvent/Net/Amazon/S3.pm view on Meta::CPAN
my $key_size = $key->{size};
print "Bucket contains key '$key_name' of size $key_size\n";
}
# fetch file from the bucket
$response = $bucket->get_key_filename( '1.JPG', 'GET', 'backup.jpg' )
or die $s3->err . ": " . $s3->errstr;
# fetch value from the bucket
$response = $bucket->get_key('reminder.txt')
or die $s3->err . ": " . $s3->errstr;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/AnyEvent/IO.pm view on Meta::CPAN
While disk I/O often seems "instant" compared to, say, socket I/O, there
are many situations where your program can block for extended time periods
when doing disk I/O. For example, you access a disk on an NFS server and
it is gone - can take ages to respond again, if ever. Or your system is
extremely busy because it creates or restores a backup - reading data from
disk can then take seconds. Or you use Linux, which for so many years has
a close-to-broken VM/IO subsystem that can often induce minutes or more of
delay for disk I/O, even under what I would consider light I/O loads.
Whatever the situation, some programs just can't afford to block for long
lib/AnyEvent/IO.pm view on Meta::CPAN
aio_rename "file.new", "file", sub {
@_
or return AE::log error => "file.new: $!";
print "file atomically replaced by file.new, backup file.bak\n";
};
};
=item aio_symlink $oldpath, $newpath, $cb->($success)
view all matches for this distribution