SVN::Dumpfile::Node::Headers - Represents the header of a node in a subversion dumpfile.
Objects of this class are used in SVN::Dumpfile::Node objects. For normal dumpfile operations this subclass is an implementation detail. Some scripts however might need to use methods of the class directly.
use SVN::Dumpfile; # or use SVN::Dumpfile::Node:Content; $df = new SVN::Dumpfile ("filename"); $node = $df->read_node; my $header = $node->headers; $header->{'Node-path'} =~ s/old/new/; # but should be done using: $node->header('Node-path') =~ s/old/new/;
See SVN::Dumpfile.
Returns a new SVN::Dumpfile::Node::Headers object. Headers line can be given as hash reference, as array reference or as list. Array and list must be even and contain key/value pairs like a hash. For internal reasons a single but undefined argument is ignored. The method returns undef if the number or kind of arguments are incorrect.
Returns the number of header lines. Can be taken as bool to check if there are any headers.
Reads header lines from the given filehandle. This lines must be in the format 'Name: value' and must be followed by a blank line. The method croaks when a miss-formatted line is found.
Returns all header lines as one string without the needed blank line separator which must be added manually. The header lines are always returned in a pre-defined order, unlike properties.
Writes all header lines and a blank line as separator to the given filehandle. The header lines are always written in a pre-defined order, unlike properties.
Checks the header is consistent, i.e. if the combination of header lines makes sens. This method is work in progress and might not work at all at the moment.
To install SVN::Dumpfile, copy and paste the appropriate command in to your terminal.
cpanm
cpanm SVN::Dumpfile
CPAN shell
perl -MCPAN -e shell install SVN::Dumpfile
For more information on module installation, please visit the detailed CPAN module installation guide.