NAME

Util::Medley::Package - Utility methods for packages.

VERSION

version 0.039

SYNOPSIS

my $pkg = Util::Medley::Package->new;

#
# positional  
#
say $pkg->basename('Foo::Bar');
say $pkg->basename(Foo::Bar->new);

#
# named pair
#
say $pkg->basename(pkg => 'Foo::Bar');
say $pkg->basename(pkg => Foo::Bar->new);
 

DESCRIPTION

A module that provides utility methods for dealing with packages

ATTRIBUTES

none

METHODS

basename

Returns basename for a given string or object. For example, Foo::Bar::Biz yields 'Biz'.

usage:
say $pkg->basename('Foo::Bar');
say $pkg->basename(Foo::Bar->new);

say $pkg->basename(name => 'Foo::Bar');
say $pkg->basename(pkg => Foo::Bar->new);
args:
pkg [Str|Object]

A string or object.