Git::FastExport::Block - A block in a fast-export stream
Git::FastExport::Block represents blocks from a git-fast-export stream.
Git::FastExport::Block
Internally, it is a simple hash with keys pointing either to a string or a reference to an array of strings, which makes it very easing to edit (when obtained via Git::FastExport next_block() method) or create.
Git::FastExport
next_block()
The following two keys are pointing to strings:
header
first line of the block
data
content of the block data section
All the other keys are pointing to references to arrays of strings (each string representing a line in the fast-export stream:
mark
author
commiter
from
merge
files
tagger
Of course, which keys are present depend on the type of the block, which is conveniently stored in the type key.
type
A Git::FastExport::Block structure is meant to be used as a hash, and is not protected by an accessor/mutator interface.
However, the module provides a method for ouputing blocks:
Return the block as a string suitable for git-fast-import.
Philippe Bruhat (BooK)
The original version of this module was created as part of my work for BOOKING.COM, which authorized its publication/distribution under the same terms as Perl itself.
Copyright 2008 Philippe Bruhat (BooK), All Rights Reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install Git::FastExport, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Git::FastExport
CPAN shell
perl -MCPAN -e shell install Git::FastExport
For more information on module installation, please visit the detailed CPAN module installation guide.