Immutable 㪠hashref, arrayref ãã¾ã«æ¬²ãããªãã¾ãã Internals::SvREADONLY() ã¯ã¯ã»ãå¼·ããã¦ãã¾ããªã¹ã¹ã¡ã§ããªãã§ãã ãã¨ã次ã®ã³ã¼ãã®æåãè¨ãå½ã¦ãããã¨ãã¦ãã赤ã®ä»äººï¼â åå¹´å¾ã®èªåï¼ãè¦ãæã«åãããã©ããã¯æªãããã¨ã use strict; use warnings; use Data::Lock 'dlock'; my $foo = { bar => "baz" }; dlock($foo); eval { my $b = $foo->{b} }; if ($@) { warn "oops: $@"; } else { warn "yay"; } è¬ãããã©ã³ã¿ã¤ã ã¨ã©ã¼èµ·ãããããå®æ°ã¯å ¨é¨ãµãã«ã¼ãã³ã¨ãã¦è¨è¿°ãã¦ãã£ãæ¹ãã³ã³ãã¤ã«ã«å¤±æãã¦ããã¦å¬ããæãããã¾ãã ã¡ãªã¿ã«Const::Commonã¨ã
{{#tags}}- {{label}}
{{/tags}}