Valiant::Naming - Standard naming information for your models
$model->model_name->human; $model->model_name->singular; $model->model_name->plural; $model->model_name->param_key;
Exposes a method on your models called model_name which returns an instance of Valiant::Name. This object contains various attributes used for creating a standard approach to naming or referencing your object.
model_name
If your object defines a method i18n_scope that will be used as the base namespace part to lookup your objects naming information from a set of defined translations.
i18n_scope
This component adds the following methods to your result classes.
An instance of Valiant::Name. This object exposes the following attributes:
A human readable name for your object. This will either be inferred from the package name of the object or if i18n_scope is defined will be looked up in translations.
Your model name in singular or plural form.
A name for your object that is suitable for serialization such as in an HTML form or other serialization formats.
John Napiorkowski email:jjnapiork@cpan.org
Valiant
Copyright 2020, John Napiorkowski email:jjnapiork@cpan.org
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install Valiant, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Valiant
CPAN shell
perl -MCPAN -e shell install Valiant
For more information on module installation, please visit the detailed CPAN module installation guide.