1Dist::Zilla::Role::PPI(U3s)er Contributed Perl DocumentatDiiosnt::Zilla::Role::PPI(3)
2
3
4

NAME

6       Dist::Zilla::Role::PPI - a role for plugins which use PPI
7

VERSION

9       version 4.300002
10

DESCRIPTION

12       This role provides some common utilities for plugins which use PPI
13

METHODS

15   ppi_document_for_file
16         my $document = $self->ppi_document_for_file($file);
17
18       Given a dzil file object (anything that does Dist::Zilla::Role::File),
19       this method returns a new PPI::Document for that file's content.
20
21       Internally, this method caches these documents. If multiple plugins
22       want a document for the same file, this avoids reparsing it.
23
24   save_ppi_document_to_file
25         my $document = $self->save_ppi_document_to_file($document,$file);
26
27       Given a PPI::Document and a dzil file object (anything that does
28       Dist::Zilla::Role::File), this method saves the serialized document in
29       the file.
30
31       It also updates the internal PPI document cache with the new document.
32
33   document_assigns_to_variable
34         if( $self->ppi_document_for_file($document, '$FOO')) { ... }
35
36       This method returns true if the document assigns to the given variable.
37

AUTHOR

39       Ricardo SIGNES <rjbs@cpan.org>
40
42       This software is copyright (c) 2011 by Ricardo SIGNES.
43
44       This is free software; you can redistribute it and/or modify it under
45       the same terms as the Perl 5 programming language system itself.
46
47
48
49perl v5.12.4                      2011-09-22         Dist::Zilla::Role::PPI(3)
Impressum