The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

Changes for version 0.3.5 - 2024-12-25

  • updated POD
  • added an optional flag to d2o that will allow one to one to call a non-existing key using its setter form, and via AUTOLOAD will return undef, this saves some code and piercing the veil into the HASH itself;
  • For example,
    • Before, it is necessary to pierce the veil of the HASH ref:
    • my $hash_ref = somecall(..); d2o $hash_ref; my @mightexist = qw/foo bar baz/; foreach my $k (@mightexist) { say $hash_ref->$k if (exists $hash_ref->{$k}); #...before }
    • After, missing methods return undef:
    • my $hash_ref = somecall(..); d2o -autoundef, $hash_ref; my @mightexist = qw/foo bar baz/; foreach my $k (@mightexist) { say $hash_ref->$k if ($hash_ref->$k); #............after }

Modules

Provides baptise, a drop-in replacement bless that creates accessors for you.