Packages / openSUSE Leap 15.6 / Source / Development/Libraries/Perl / perl-Tie-Hash-Method

Source Package: perl-Tie-Hash-Method (0.02-bp156.3.1)

Tied hash with specific methods overriden by callbacks

Tie::Hash::Method provides a way to create a tied hash with specific overriden behaviour without having to create a new class to do it. A tied hash with no methods overriden is functionally equivalent to a normal hash. Each method in a standard tie can be overriden by providing a callback to the tie call. So for instance if you wanted a tied hash that changed 'foo' into 'bar' on store you could say: tie my %hash, 'Tie::Hash::Method', STORE => sub { (my $v=pop)=~s/foo/bar/g if defined $_[2]; return $_[0]->base_hash->{$_[1]}=$v; }; The callback is called with exactly the same arguments as the tie itself, in particular the tied object is always passed as the first argument. The tied object is itself an array, which contains a second hash in the HASH slot (index 0) which is used to perform the default operations. The callbacks available are in a hash keyed by name in the METHOD slot of the array (index 1). If your code needs to store extra data in the object it should be stored in the PRIVATE slot of the object (index 2). No future release of this module will ever use or alter anything in that slot. The arguments passed to the tie constructor will be seperated by the case of their keys. The ones with all capitals will be stored in the METHOD hash, and the rest will be stored in the PRIVATE hash.

Package information

Homepage
[http://search.cpan.org/dist/Tie-Hash-Method/]
License
GPL-1.0+ or Artistic-1.0
Maintainer del pacchetto downstream
Sconosciuto: non segnalato nella fonte indicizzata

The following binary packages are built from this source package:

Vulnerabilità note

Nessun avviso corrispondente nelle fonti monitorate.

Ultima sincronizzazione:

[Catalogo CVE]

Fonti

  • Authoritative source; repository metadata signature verified

    Prova della firma

    leap-15-6-oss-multiarch:ca2653101b9afba6656aea529109ba0c0f1ca1a92aa8614e7c887fda5264c230

    Repository-signature verification record
    Signed-object SHA-256
    ca2653101b9afba6656aea529109ba0c0f1ca1a92aa8614e7c887fda5264c230
    Signer fingerprint
    AD485664E901B867051AB15F35A2F86E29B700A4
    Keyring revision
    opensuse-project-signing-key.asc
    SHA-256 b5745739ebfb95b25b8e810f9bcb847fe750ccda598bd85f02f0e974599a6d7e
    Tool and policy
    gpgv (GnuPG) 2.4.9
    openfactory-software-catalog-signature-v1
    Verification time
    Sep 1, 2026
    Repository metadata hash linkage
    Result
    Recorded as verified; digest details unavailable