nagios-plugin-check_raid icon indicating copy to clipboard operation
nagios-plugin-check_raid copied to clipboard

update Module::Pluggable interface

Open glensc opened this issue 8 years ago • 0 comments

Module::Pluggable initially added in #115

21:58:18  glen> hi. how do i mix version and attributes to an use statement?
21:58:19  glen> use Module::Pluggable instantiate => 'new', sub_name => '_plugins';
21:58:28  glen> need to say to use version 5.1
21:58:48  mst> glen: use Module::Pluggable::Object 5.1;
21:58:53  mst> glen: <use object here>
21:59:00  mst> glen: the old import based interface is horrible and best aboided
...
22:01:33  mst> ::Object was written somewhere around 10 years ago so that Catalyst could stop using the stupid import() based API
...
22:02:59  mst> yeah, also, it looks like there's no link from M::P to M::P::O
22:03:26 (*) mst goes and shouts at the Module::Pluggable::Object author
...
22:04:55  mst> I'm suggesting you should upgrade your code to the best practice of 10 years ago first
22:05:33  mst> otherwise, 'perldoc -f use' documents 'use Module::Pluggable 5.1 instantiate => 'new', ...;'
22:05:39  mst> and I'm not sure why you aren't just using that
22:05:54  mst> but personally I wouldn't hard code the 5.1 requirement at all
22:06:21  mst> since it only matters when you're fatpacked, so I'd only have the fatpacked version check that
22:06:23  glen> mst: well. as you were saying M::P has no link to M::P::O, so i apprently read the main doc when i implemented it
22:06:36  mst> yes. hence why I just went and shouted at the author for you.

glensc avatar Feb 29 '16 20:02 glensc