| 1 | package Data::Perl::String::MooseLike; | ||
| 2 | 1 | $Data::Perl::String::MooseLike::VERSION = '0.001009'; | |
| 3 | # ABSTRACT: data::Perl::String subclass that simulates Moose's native traits. | ||
| 4 | |||
| 5 | 1 | ▶ | use strictures 1; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 6 | |||
| 7 | 1 | ▶ | use Role::Tiny::With; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 8 | 1 | ▶ | use Class::Method::Modifiers; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 9 | |||
| 10 | 1 | with 'Data::Perl::Role::String'; | |
| 11 | |||
| 12 | 1 | my @methods = grep { $_ ne 'new' } Role::Tiny->methods_provided_by('Data::Perl::Role::String'); | |
| 13 | |||
| 14 | 32 | ▶ | around @methods => sub { |
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||
| 15 | 32 | my $orig = shift; | |
| 16 | |||
| 17 | 32 | $orig->(\$_[0], @_[1..$#_]); | |
| 18 | 1 | }; | |
| 19 | |||
| 20 | 1 | 1; | |
| 21 | |||
| 22 | =pod | ||
| 23 | |||
| 24 | =encoding UTF-8 | ||
| 25 | |||
| 26 | =head1 NAME | ||
| 27 | |||
| 28 | Data::Perl::String::MooseLike - data::Perl::String subclass that simulates Moose's native traits. | ||
| 29 | |||
| 30 | =head1 VERSION | ||
| 31 | |||
| 32 | version 0.001009 | ||
| 33 | |||
| 34 | =head1 SYNOPSIS | ||
| 35 | |||
| 36 | use Data::Perl::Collection::String::MooseLike; | ||
| 37 | |||
| 38 | my $string = Data::Perl::Collection::String::MooseLike->new("this is a string\n"); | ||
| 39 | |||
| 40 | $string->chomp; | ||
| 41 | |||
| 42 | $string->substr(); # etc | ||
| 43 | |||
| 44 | =head1 DESCRIPTION | ||
| 45 | |||
| 46 | This class provides a wrapper and methods for interacting with a string. All | ||
| 47 | methods are written to emulate/match existing behavior that exists with Moose's | ||
| 48 | native traits. You should probably be looking at Data::Perl's documentation instead. | ||
| 49 | |||
| 50 | =head1 SEE ALSO | ||
| 51 | |||
| 52 | =over 4 | ||
| 53 | |||
| 54 | =item * L<Data::Perl> | ||
| 55 | |||
| 56 | =item * L<Data::Perl::Role::Collection::String> | ||
| 57 | |||
| 58 | =back | ||
| 59 | |||
| 60 | =head1 AUTHOR | ||
| 61 | |||
| 62 | Toby Inkster <tobyink@cpan.org> | ||
| 63 | |||
| 64 | =head1 COPYRIGHT AND LICENSE | ||
| 65 | |||
| 66 | This software is copyright (c) 2020 by Matthew Phillips <mattp@cpan.org>. | ||
| 67 | |||
| 68 | This is free software; you can redistribute it and/or modify it under | ||
| 69 | the same terms as the Perl 5 programming language system itself. | ||
| 70 | |||
| 71 | =cut | ||
| 72 | |||
| 73 | __END__ | ||