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.014
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->document_assigns_to_variable($document, '$FOO')) { ... }
35
36       This method returns true if the document assigns to the given variable
37       (the sigil must be included).
38

AUTHOR

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