Refactor PR #74 to avoid dependency on the PPI module.#147
Open
hakonhagland wants to merge 2 commits intogaru:mainfrom
Open
Refactor PR #74 to avoid dependency on the PPI module.#147hakonhagland wants to merge 2 commits intogaru:mainfrom
hakonhagland wants to merge 2 commits intogaru:mainfrom
Conversation
6d5b7c0 to
7dc23b5
Compare
oalders
reviewed
Mar 9, 2021
lib/Data/Printer/Object.pm
Outdated
Comment on lines
758
to
761
| <<<<<<< HEAD | ||
|
|
||
| ======= | ||
| >>>>>>> Refactor PR #74 to void PPI dependency. |
Contributor
There was a problem hiding this comment.
These are causing the build to fail.
Contributor
Author
There was a problem hiding this comment.
@oalders Thanks! I thought I removed those markers inserted by git rebase :)
Contributor
There was a problem hiding this comment.
@hakonhagland it happens to me on a regular basis. :)
oalders
reviewed
Mar 9, 2021
lib/Data/Printer/Object.pm
Outdated
Comment on lines
1244
to
1250
| <<<<<<< HEAD | ||
| =head4 universal | ||
| ======= | ||
| =item * caller_plugin - name of caller plugin (default: undef). If you specify a name, e.g. c<PPI>, it will use c<Data::Printer::Plugin::Caller::PPI> to print the caller information label. | ||
|
|
||
| =item * class - class properties to override. | ||
| >>>>>>> Added Pod documentation for caller_plugin. |
Contributor
There was a problem hiding this comment.
These markers need to be removed as well. :)
Pull request garu#74 'show variable name as __VAR__' had a dependency on the PPI module which made its inclusion in the master less atractive for the users not using the feature. By refactoring the part of the code that depended on PPI out in a separate module, only the users that would like to use the feature needs to install PPI. The code remaining in master (that does not depend on PPI) now implements a plugin hook in the write_label() sub in Data::Printer::Object. An option in the configuration file called 'caller_plugin' is used to register a caller plugin. If such a plugin is registered, write_label() will load the plugin and then call the plugin to do the generation of the label string. The refactored part of garu#74 that depends on PPI has been included in the module Data::Printer::Plugin::Caller::PPI (currently on Github).
The Pod coverage test for Data::Printer::Object was failing.
ed857aa to
427ac11
Compare
Contributor
Author
|
rebased this |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull request #74 had a dependency on the PPI module which made its inclusion into
masternot so attractive for users not using the feature. By refactoring the part of the code that depended onPPIout in a separate module, only the users that would like to use the feature needs to install the extra dependencies.The code that still remains in master (that is the code that does not depend on PPI) now implements a plugin hook in the
write_label()sub inData::Printer::Object. An option in the configuration file calledcaller_pluginis used to register a caller plugin. If such a plugin is registered,write_label()will load the plugin and use the plugin to do the generation of the label string.The refactored part of #74 that depends on
PPIhas been included in a module Data::Printer::Plugin::Caller::PPI (currently only on Github).