Name

Bif::PlugInto - plug a module into another

Synopsis

use Bif::PlugInto qw/TARGET/;
use Bif::PlugInto qw/SOURCE TARGET/;

# One argument version copies methods
# from __PACKAGE__ into My::Program
package My::Plugin
use strict;
use warnings;

sub something { ... }

# Yes, this comes after subroute definitions
use Bif::PlugInto qw/Some::Program/;

# Two argument version lets you
# explicitly identify source & target
package App;
use strict;
use warnings;
use Bif::PlugInto qw/My::Other::Plugin Other::App/;

Description

Note that when using the single-argument version only the subroutines that have already been defined in the current __PACKAGE__ will be plugged into the target.

Author

Mark Lawrence <nomad@null.net>

Copyright And License

Copyright 2016-2017 Mark Lawrence <nomad@null.net>

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.