Philippe Bruhat (BooK) > Git-FastExport > Git::FastExport::Block

Download:
Git-FastExport-0.105.tar.gz

Dependencies

Annotate this POD

CPAN RT

Open  3
View/Report Bugs
Module Version: 0.105   Source  

NAME ^

Git::FastExport::Block - A block in a fast-export stream

VERSION ^

version 0.105

SYNOPSIS ^

This package is used internally by Git::FastExport.

DESCRIPTION ^

Git::FastExport::Block represents blocks from a git fast-export stream.

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 easy to edit (when obtained via Git::FastExport next_block() method) or create blocks in a git fast-export stream.

The following two keys are pointing to strings:

All the other keys are pointing to references to arrays of strings (each string representing a line in the fast-export stream:

Of course, which keys are present depend on the type of the block, which is conveniently stored in the type key.

All other keys are ignored by "as_string".

METHODS ^

A Git::FastExport::Block structure is meant to be used as a hash, and is not protected by an accessor/mutator interface. Or a constructor.

However, the module provides a method for outputing blocks:

as_string

     print $block->as_string;

Return the block as a string suitable for git fast-import.

BUGS ^

Please report any bugs or feature requests on the bugtracker website http://rt.cpan.org/NoAuth/Bugs.html?Dist=Git-FastExport or by email to bug-git-fastexport@rt.cpan.org.

When submitting a bug or request, please include a test-file or a patch to an existing test-file that illustrates the bug or desired feature.

AUTHOR ^

Philippe Bruhat (BooK) <book@cpan.org>

ACKNOWLEDGEMENTS ^

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 ^

Copyright 2008-2014 Philippe Bruhat (BooK), All Rights Reserved.

LICENSE ^

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

syntax highlighting: