| 1 | 6 | ▶ | use 5.006; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 2 | 6 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 3 | 6 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 4 | |||
| 5 | package Set::Associate::NewKey::LinearWrap; | ||
| 6 | |||
| 7 | # ABSTRACT: destructively empty the supply pool from the left hand end to give associations. | ||
| 8 | |||
| 9 | 6 | our $VERSION = '0.004000'; | |
| 10 | |||
| 11 | 6 | our $AUTHORITY = 'cpan:KENTNL'; # AUTHORITY | |
| 12 | |||
| 13 | 6 | ▶ | use Moose qw( with ); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 14 | |||
| 15 | 6 | with 'Set::Associate::Role::NewKey' => { can_get_assoc => 1, }; | |
| 16 | |||
| 17 | 6 | __PACKAGE__->meta->make_immutable; | |
| 18 | |||
| 19 | 6 | ▶ | no Moose; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 20 | |||
| 21 | |||
| 22 | |||
| 23 | |||
| 24 | |||
| 25 | |||
| 26 | |||
| 27 | 0 | ▶ | sub name { 'linear_wrap' } |
|
Subroutine
name: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 28 | |||
| 29 | |||
| 30 | |||
| 31 | |||
| 32 | |||
| 33 | |||
| 34 | |||
| 35 | |||
| 36 | |||
| 37 | |||
| 38 | |||
| 39 | sub get_assoc { | ||
| 40 | 28 | ▶ | return $_[1]->_items_cache_shift; |
|
Subroutine
get_assoc: called CC=1 SCAR=0.0
Pod
documented
| |||
| 41 | } | ||
| 42 | |||
| 43 | 6 | 1; | |
| 44 | |||
| 45 | __END__ | ||
| 46 | |||
| 47 | =pod | ||
| 48 | |||
| 49 | =encoding UTF-8 | ||
| 50 | |||
| 51 | =head1 NAME | ||
| 52 | |||
| 53 | Set::Associate::NewKey::LinearWrap - destructively empty the supply pool from the left hand end to give associations. | ||
| 54 | |||
| 55 | =head1 VERSION | ||
| 56 | |||
| 57 | version 0.004000 | ||
| 58 | |||
| 59 | =head1 METHODS | ||
| 60 | |||
| 61 | =head2 name | ||
| 62 | |||
| 63 | The name of this key assignment method ( C<linear_wrap> ) | ||
| 64 | |||
| 65 | =head2 get_assoc | ||
| 66 | |||
| 67 | Returns a value destructively by taking the first value from C<$set_assoc>'s pool. | ||
| 68 | |||
| 69 | C<$new_key> is ignored with this method. | ||
| 70 | |||
| 71 | my $value = $object->get_assoc( $set_assoc, $new_key ); | ||
| 72 | |||
| 73 | =head1 AUTHOR | ||
| 74 | |||
| 75 | Kent Fredric <kentnl@cpan.org> | ||
| 76 | |||
| 77 | =head1 COPYRIGHT AND LICENSE | ||
| 78 | |||
| 79 | This software is copyright (c) 2015 by Kent Fredric <kentfredric@gmail.com>. | ||
| 80 | |||
| 81 | This is free software; you can redistribute it and/or modify it under | ||
| 82 | the same terms as the Perl 5 programming language system itself. | ||
| 83 | |||
| 84 | =cut | ||