NAME

MVC::Neaf::Util::Base - base class for other Not Even A Framework classes.

DESCRIPTION

This is an internal package providing some utility methods for Neaf itself.

See MVC::Neaf::X for public interface.

METHODS

new( %options )

Will happily accept any args and pack them into self.

my_croak( $message )

Like croak() from Carp, but the message is prefixed with self's package and the name of method in which error occurred.

dir ($path || [$path, ...])

For every given path, return $path if it starts with a '/', or canonized concatenation of $self->neaf_base_dir and $path otherwise.

Dies if neaf_base_dir is not set.

NOTE Please use this method whenever your Neaf extension/plugin is given a path, do not rely on '.' to be set correctly!

neaf_base_dir()

Dumb accessor that returns $self->{neaf_base_dir}.

Used by dir (see above).

LICENSE AND COPYRIGHT

This module is part of MVC::Neaf suite.

Copyright 2016-2023 Konstantin S. Uvarin khedin@cpan.org.

This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.

See http://dev.perl.org/licenses/ for more information.