Package::Watchdog::Util - Utility functions for use within Package::Watchdog objects.
Collection of utility functions. All functions in the package are exported.
Create an accessor method for each accessor name passed in. Accessors store and retrieve data from $self->{ $accessor }. Determines which package the accessors should be added to via caller().
Takes a package and list of subs, if the list is empty or undefined than all subs in the package will be returned. If the list contains '*' then the return will be all the susb in the list in addition to all the subs in the package.
Note: All subs in a package does not include inherited subs.
Combine 2 arrayrefs of sub names into one arrayref containign entirely unique items.
Returns all the sub names in the package.
Get references to all the specified subs in the specified package.
$subs must be specified, it will not default to all susb in package.
return datastructure:
%subs = ( name => ref, ... );
Get the coderef for the specified sub in the specified package. If the sub is inherited, a ref to it will still be returned.
$new should be a coderef.
If $new is undef or omitted, the specified sub will be deleted from the package.
Copyright (C) 2009 OpenSourcery, LLC
Package-Watchdog 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 2 of the License, or (at your option) any later version.
Package-Watchdog is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
Package-Watchdog is packaged with a copy of the GNU General Public License. Please see docs/COPYING in this distribution.
To install Package::Watchdog, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Package::Watchdog
CPAN shell
perl -MCPAN -e shell install Package::Watchdog
For more information on module installation, please visit the detailed CPAN module installation guide.