- SEE ALSO
Perl::Signature::Set - Create, store and check groups of signatures
There are a number of cases where you might want to create and look after a whole bunch of signatures.
The most common of these is:
1. Generate signatures 2. Do some process that shouldn't change the files functionally 3. Test to make sure it didn't
Examples for 2. could be things like applying Perl::Tidy, merging in documentation-only patches from external sources, and other similar things.
Perl::Signature::Set lets you create an object that can store a while bunch of file signatures, save the set to a file, load it in again, and test the lot to check for changes.
Saving and Loading
For simplicity and easy of creation, Perl::Signature::Set has been implemented as a subclass of Config::Tiny.
Creates a new Perl::Signature::Set object. Takes as an optional argument the normalization layer you wish to use.
Returns a new Perl::Signature::Set object.
layer accessor returns the normalization layer that was used for all of the signatures in the object.
add method takes the name of a file to generate a signature for and add to the set.
Returns the actual Perl::Signature object created as a convenience, or
undef if the file has already been added, or on error.
files method provides all of the names of the files contained in the set, in default sorted order.
Returns a list of file names, or the null list if the set contains no files.
file method is used to get the Perl::Signature object for a single named file.
Returns a Perl::Signature object, or
undef if the file is not in the set.
signatures method returns all of the Signature objects from the Set, in filename-sorted order.
Returns a list of Perl::Signature objects, or the null list if the set does not contain any Signature objects.
changes method checks the signatures for each file and provides a hash listing the files that have changed as the key, and either "changed" or "removed" as the value.
Returns a HASH reference, false (
'') if there are no changes, or
undef on error.
All bugs should be filed via the CPAN bug tracker at
For other issues, or commercial enhancement or support, contact the author.
Adam Kennedy <email@example.com>
Copyright 2005 - 2008 Adam Kennedy.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
The full text of the license can be found in the LICENSE file included with this module.