NAME

Archive::Par - use & manipulate par files

SYNOPSIS

use Archive::Par qw( $PACKAGE $VERSION );

DESCRIPTION

CLASS CONSTANTS

CLASS COMPONENTS

CLASS HIGHER-LEVEL FUNCTIONS

_parse_par_output

ARGUMENTS
text

Text to parse

fn

Name of file submitted to par (for sanity checking).

RETURNS
status

hashref from file name to status

file_name

hashref from file name, as it should be as per par, to file found

bad_old_files

Where new files have been created containing bad data (e.g., old corrupt files being moved out of the way), these files are enumerated here.

CLASS HIGHER-LEVEL PROCEDURES

INSTANCE CONSTRUCTION

new

Create & return a new thing.

INSTANCE COMPONENTS

INSTANCE HIGHER-LEVEL FUNCTIONS

files

ARGUMENTS

None

RETURNS
files

List of files known by par

file_known

ARGUMENTS
fn

Name of file to look up. This is the name as expected by par, not any suitable substitute found by par.

RETURNS
known

Whether this file name is known by par.

file_found

PRECONDITION
$self->file_known($fn)
ARGUMENTS
fn

Name of file to look up. This is the name as expected by par, not any suitable substitute found by par.

RETURNS
found

Whether this file name is found by par.

file_restorable

PRECONDITION
$self->file_known($fn)
ARGUMENTS
fn

Name of file to look up. This is the name as expected by par, not any suitable substitute found by par.

RETURNS
found

Whether this file name is thought by par to be restorable.

file_moved

PRECONDITION
$self->file_known($fn)
ARGUMENTS
fn

Name of file to look up. This is the name as expected by par, not any suitable substitute found by par.

RETURNS
found

The name this file has apparently moved to as per par; undef if the file has not moved.

file_ok

PRECONDITION
$self->file_known($fn)
ARGUMENTS
fn

Name of file to look up. This is the name as expected by par, not any suitable substitute found by par.

RETURNS
found

Whether this file name is thought by par to be in tip-top condition.

file_corrupt

PRECONDITION
$self->file_known($fn)
ARGUMENTS
fn

Name of file to look up. This is the name as expected by par, not any suitable substitute found by par.

RETURNS
found

Whether this file name is thought by par to be corrupt

file_recoverable

PRECONDITION
! $self->file_ok($fn)
ARGUMENTS
fn
RETURNS

Whether the file may be regenerated somehow

recoverable

PRECONDITIONS
$self->checked

! $self->ok
ARGUMENTS

None

RETURNS
recoverable

true if the files can be recovered, false if not

dump_file_status

Convenience method for returning status of files in par.

checked

ARGUMENTS

None

RETURNS
checked

Whether the status flags for this instance are meaningful.

ok

PRECONDITIONS
$self->checked
ARGUMENTS

None

RETURNS
ok

True if there are no fixes for par to make.

INSTANCE HIGHER-LEVEL PROCEDURES

restore

PRECONDITIONS
$self->recoverable
ARGUMENTS
remove_old_files

Optional If true, remove (corrupt) old files created by the restore.

EXAMPLES

BUGS

REPORTING BUGS

Email the author.

AUTHOR

Martyn J. Pearce fluffy@cpan.org

COPYRIGHT

Copyright (c) 2002 Martyn J. Pearce. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

SEE ALSO