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 6.025
10

DESCRIPTION

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

PERL VERSION

15       This module should work on any version of perl still receiving updates
16       from the Perl 5 Porters.  This means it should work on any version of
17       perl released in the last two to three years.  (That is, if the most
18       recently released version is v5.40, then this module should work on
19       both v5.40 and v5.38.)
20
21       Although it may work on older versions of perl, no guarantee is made
22       that the minimum required version will not be increased.  The version
23       may be increased for any reason, and there is no promise that patches
24       will be accepted to lower the minimum required perl.
25

METHODS

27   ppi_document_for_file
28         my $document = $self->ppi_document_for_file($file);
29
30       Given a dzil file object (anything that does Dist::Zilla::Role::File),
31       this method returns a new PPI::Document for that file's content.
32
33       Internally, this method caches these documents. If multiple plugins
34       want a document for the same file, this avoids reparsing it.
35
36   save_ppi_document_to_file
37         my $document = $self->save_ppi_document_to_file($document,$file);
38
39       Given a PPI::Document and a dzil file object (anything that does
40       Dist::Zilla::Role::File), this method saves the serialized document in
41       the file.
42
43       It also updates the internal PPI document cache with the new document.
44
45   document_assigns_to_variable
46         if( $self->document_assigns_to_variable($document, '$FOO')) { ... }
47
48       This method returns true if the document assigns to the given variable
49       (the sigil must be included).
50

AUTHOR

52       Ricardo SIGNES 😏 <rjbs@semiotic.systems>
53
55       This software is copyright (c) 2022 by Ricardo SIGNES.
56
57       This is free software; you can redistribute it and/or modify it under
58       the same terms as the Perl 5 programming language system itself.
59
60
61
62perl v5.36.0                      2022-09-01         Dist::Zilla::Role::PPI(3)
Impressum