Create an object/Native demonstration: Difference between revisions
m
→{{header|Perl}}: future-proof for 5.36, explicit :prototype
Thundergnat (talk | contribs) m (syntax highlighting fixup automation) |
SqrtNegInf (talk | contribs) m (→{{header|Perl}}: future-proof for 5.36, explicit :prototype) |
||
Line 668:
=={{header|Perl}}==
<syntaxhighlight lang="perl">
use parent Tie::Hash;▼
package LockedHash;
▲use parent 'Tie::Hash';
use Carp;
sub TIEHASH {
Line 711 ⟶ 712:
}
sub lock_hash :prototype(\%) {
my $ref = shift;
tie(%$ref, __PACKAGE__, %$ref);
|