Data-Printer icon indicating copy to clipboard operation
Data-Printer copied to clipboard

Refactor PR #74 to avoid dependency on the PPI module.

Open hakonhagland opened this issue 5 years ago • 2 comments

Pull request #74 had a dependency on the PPI module which made its inclusion into master not so attractive for 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 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 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 use the plugin to do the generation of the label string.

The refactored part of #74 that depends on PPI has been included in a module Data::Printer::Plugin::Caller::PPI (currently only on Github).

hakonhagland avatar Jul 17 '20 11:07 hakonhagland

Coverage Status

Coverage decreased (-0.04%) to 90.571% when pulling ed857aa6e593febc816fde69adc468fb88a9da8b on hakonhagland:caller_plugin into 04631d9a5b74cbe094273c5c2adb1d443ab66af1 on garu:main.

coveralls avatar Mar 09 '21 15:03 coveralls

rebased this

hakonhagland avatar Jan 14 '23 23:01 hakonhagland