1Devel::PatchPerl::PlugiUns(e3r)Contributed Perl DocumentDaetvieoln::PatchPerl::Plugin(3)
2
3
4

NAME

6       Devel::PatchPerl::Plugin - Devel::PatchPerl plugins explained
7

VERSION

9       version 1.52
10

DESCRIPTION

12       This document explains the Devel::PatchPerl plugin system.
13
14       Plugins are a mechanism for providing additional functionality to
15       Devel::PatchPerl.
16
17       Plugins are searched for in the Devel::PatchPerl::Plugin namespace.
18

INITIALISATION

20       The plugin constructor is "patchperl".
21
22       A plugin is specified using the "PERL5_PATCHPERL_PLUGIN" environment
23       variable. It may either be specified in full (ie.
24       "Devel::PatchPerl::Plugin::Feegle") or as the short part (ie.
25       "Feegle").
26
27         $ export PERL5_PATCHPERL_PLUGIN=Devel::PatchPerl::Plugin::Feegle
28
29         $ export PERL5_PATCHPERL_PLUGIN=Feegle
30
31       When Devel::PatchPerl has identified the perl source patch and done its
32       patching it will attempt to load the plugin identified. It will then
33       call the class method "patchperl" for the plugin package, with the
34       following parameters:
35
36         'version', the Perl version of the source tree;
37         'source', the absolute path to the Perl source tree;
38         'patchexe', the 'patch' utility that can be used;
39
40       Plugins are called with the current working directory being the root of
41       the Perl source tree, ie. "source".
42
43       Summarised:
44
45         $ENV{PERL5_PATCHPERL_PLUGIN} = 'Devel::PatchPerl::Plugin::Feegle';
46
47         my $plugin = $ENV{PERL5_PATCHPERL_PLUGIN};
48
49         eval "require $plugin";
50
51         eval {
52           $plugin->patchperl( version => $vers, source => $srcdir, patchexe => $patch );
53         };
54

WHAT CAN PLUGINS DO?

56       Anything you desire to a Perl source tree.
57

WHY USE AN ENVIRONMENT VARIABLE TO SPECIFY PLUGINS?

59       So that indicating a plugin to use can be specified independently of
60       whatever mechanism is calling Devel::PatchPerl to do its bidding.
61
62       Think perlbrew.
63

AUTHOR

65       Chris Williams <chris@bingosnet.co.uk>
66
68       This software is copyright (c) 2018 by Chris Williams and Marcus
69       Holland-Moritz.
70
71       This is free software; you can redistribute it and/or modify it under
72       the same terms as the Perl 5 programming language system itself.
73
74
75
76perl v5.28.0                      2018-06-23       Devel::PatchPerl::Plugin(3)
Impressum