Archive-BagIt
view release on metacpan or search on metacpan
README.mkdn view on Meta::CPAN
## load\_plugins
As default SHA512 and MD5 will be loaded and therefore used. If you want to create a bag only with one or a specific
checksum-algorithm, you could use this method to (re-)register it. It expects list of strings with namespace of type:
Archive::BagIt::Plugin::Algorithm::XXX where XXX is your chosen fixity algorithm.
## load()
Triggers loading of an existing bag
## verify\_bag($opts)
A method to verify a bag deeply. If `$opts` is set with `{return_all_errors}` all fixity errors are reported.
The default ist to croak with error message if any error is detected.
HINT: You might also want to check [Archive::BagIt::Fast](https://metacpan.org/pod/Archive%3A%3ABagIt%3A%3AFast) to see a more direct way of accessing files (and thus faster).
## calc\_payload\_oxum()
returns an array with octets and streamcount of payload-dir
## calc\_bagsize()
returns a string with human readable size of paylod
## create\_bagit()
creates a bagit.txt file
## create\_baginfo()
creates a bag-info.txt file
Hint: the entries 'Bagging-Date', 'Bag-Software-Agent', 'Payload-Oxum' and 'Bag-Size' will be automagically set,
existing values in internal bag-info representation will be overwritten!
## store()
store a bagit-obj if bagit directory-structure was already constructed.
## init\_metadata( $bag\_path, $options)
A constructor that will just create the metadata directory
This won't make a bag, but it will create the conditions to do that eventually
## make\_bag( $bag\_path, $options )
A constructor that will make and return a bag from a directory,
It expects a preliminary bagit-dir exists.
If there a data directory exists, assume it is already a bag (no checking for invalid files in root)
# AVAILABILITY
The latest version of this module is available from the Comprehensive Perl
Archive Network (CPAN). Visit [http://www.perl.com/CPAN/](http://www.perl.com/CPAN/) to find a CPAN
site near you, or see [https://metacpan.org/module/Archive::BagIt/](https://metacpan.org/module/Archive::BagIt/).
# BUGS AND LIMITATIONS
You can make new bug reports, and view existing ones, through the
web interface at [http://rt.cpan.org](http://rt.cpan.org).
# AUTHOR
Andreas Romeyke <cpan@andreas.romeyke.de>
# COPYRIGHT AND LICENSE
This software is copyright (c) 2025 by Rob Schmidt <rjeschmi@gmail.com>, William Wueppelmann and Andreas Romeyke.
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.
( run in 2.966 seconds using v1.01-cache-2.11-cpan-99c4e6809bf )