Name : perl-Tie-Moose
| |
Version : 0.003
| Vendor : obs://build_opensuse_org/devel:languages:perl
|
Release : lp156.1.1
| Date : 2024-07-03 19:16:00
|
Group : Development/Libraries/Perl
| Source RPM : perl-Tie-Moose-0.003-lp156.1.1.src.rpm
|
Size : 0.05 MB
| |
Packager : https://www_suse_com/
| |
Summary : Tie a Hash to a Moose Object (Yeah, Like Tie::Mooseobject)
|
Description :
This module is much like the Tie::MooseObject manpage. It ties a hash to an instance of a the Moose manpage-based class, allowing you to access attributes as hash keys. It uses the accessors provided by Moose, and thus honours read-only attributes, type constraints and coercions, triggers, etc.
There are a few key differences with the Tie::MooseObject manpage:
* *
It handles differently named getters/setters more to my liking. Given the example in the SYNOPSIS, with Tie::MooseObject you need to write:
$bob{set_age} = 32; say $bob{get_age};
Whereas with Tie::Moose, you just use the \'age\' hash key for both fetching from and storing to the hash.
* *
Implements \'DELETE\' from the the Tie::Hash manpage interface. Tie::MooseObject does not allow keys to be deleted from its hashes.
(\'DELETE\' only works on Moose attributes that have a \"clearer\" method.)
* *
Supplied with various traits to influence the behaviour of the tied hash.
tie my %bob, \"Tie::Moose\"->with_traits(\"ReadOnly\"), $bob;
(Note that by design, many of the traits supplied with Tie::Moose are mutually exclusive.)
|
RPM found in directory: /packages/linux-pbone/ftp5.gwdg.de/pub/opensuse/repositories/devel:/languages:/perl:/CPAN-T/15.6/noarch |