-
Notifications
You must be signed in to change notification settings - Fork 61
Refactor PR #74 to avoid dependency on the PPI module. #147
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
6d5b7c0 to
7dc23b5
Compare
lib/Data/Printer/Object.pm
Outdated
| <<<<<<< HEAD | ||
| ======= | ||
| >>>>>>> Refactor PR #74 to void PPI dependency. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These are causing the build to fail.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@oalders Thanks! I thought I removed those markers inserted by git rebase :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@hakonhagland it happens to me on a regular basis. :)
lib/Data/Printer/Object.pm
Outdated
| <<<<<<< 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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
|
rebased this |
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).