Commit | Line | Data |
44babf1f |
1 | package Moose::Meta::Method::Accessor::Native::Hash::delete; |
2 | |
3 | use strict; |
4 | use warnings; |
5 | |
10bd99ec |
6 | our $VERSION = '1.14'; |
44babf1f |
7 | $VERSION = eval $VERSION; |
8 | our $AUTHORITY = 'cpan:STEVAN'; |
9 | |
10 | use base 'Moose::Meta::Method::Accessor::Native::Hash::Writer'; |
11 | |
12 | sub _adds_members { 0 } |
13 | |
14 | sub _potential_value { |
15 | my ( $self, $slot_access ) = @_; |
16 | |
17 | return "( do { my \%potential = %{ $slot_access }; delete \@potential{\@_}; \\\%potential; } )"; |
18 | } |
19 | |
20 | sub _inline_optimized_set_new_value { |
21 | my ( $self, $inv, $new, $slot_access ) = @_; |
22 | |
584540d9 |
23 | return "delete \@{ $slot_access }{\@_}"; |
44babf1f |
24 | } |
25 | |
26 | 1; |