| 1 | package Locale::Babelfish::Phrase::Node; | ||
| 2 | |||
| 3 | # ABSTRACT: Babelfish AST abstract node. | ||
| 4 | |||
| 5 | 13 | ▶ | use utf8; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 6 | 13 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 7 | 13 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 8 | |||
| 9 | 13 | ▶ | use parent qw( Class::Accessor::Fast ); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 10 | |||
| 11 | 13 | our $VERSION = '2.10'; # VERSION | |
| 12 | |||
| 13 | |||
| 14 | sub new { | ||
| 15 | 183 | ▶ | my ( $class, %args ) = @_; |
|
Subroutine
new: called CC=1 SCAR=0.0
Pod
documented
| |||
| 16 | 183 | return bless { %args }, $class; | |
| 17 | } | ||
| 18 | |||
| 19 | |||
| 20 | sub to_perl_escaped_str { | ||
| 21 | 82 | ▶ | my ( $self, $str ) = @_; |
|
Subroutine
to_perl_escaped_str: called CC=1 SCAR=0.0
Pod
documented
| |||
| 22 | |||
| 23 | 82 | $str =~ s/\\/\\\\/g; | |
| 24 | 82 | $str =~ s/'/\\'/g; | |
| 25 | 82 | return "'$str'"; | |
| 26 | } | ||
| 27 | |||
| 28 | 13 | 1; | |
| 29 | |||
| 30 | __END__ | ||
| 31 | |||
| 32 | =pod | ||
| 33 | |||
| 34 | =encoding UTF-8 | ||
| 35 | |||
| 36 | =head1 NAME | ||
| 37 | |||
| 38 | Locale::Babelfish::Phrase::Node - Babelfish AST abstract node. | ||
| 39 | |||
| 40 | =head1 VERSION | ||
| 41 | |||
| 42 | version 2.10 | ||
| 43 | |||
| 44 | =head1 METHODS | ||
| 45 | |||
| 46 | =head2 new | ||
| 47 | |||
| 48 | $class->new( %args ) | ||
| 49 | |||
| 50 | Instantiates AST node. | ||
| 51 | |||
| 52 | =head2 to_perl_escaped_str | ||
| 53 | |||
| 54 | $str = $node->to_perl_escaped_str | ||
| 55 | |||
| 56 | Returns node string to be used in Perl source code. | ||
| 57 | |||
| 58 | =head1 AUTHORS | ||
| 59 | |||
| 60 | =over 4 | ||
| 61 | |||
| 62 | =item * | ||
| 63 | |||
| 64 | Akzhan Abdulin <akzhan@cpan.org> | ||
| 65 | |||
| 66 | =item * | ||
| 67 | |||
| 68 | Igor Mironov <grif@cpan.org> | ||
| 69 | |||
| 70 | =item * | ||
| 71 | |||
| 72 | Victor Efimov <efimov@reg.ru> | ||
| 73 | |||
| 74 | =item * | ||
| 75 | |||
| 76 | REG.RU LLC | ||
| 77 | |||
| 78 | =item * | ||
| 79 | |||
| 80 | Kirill Sysoev <k.sysoev@me.com> | ||
| 81 | |||
| 82 | =item * | ||
| 83 | |||
| 84 | Alexandr Tkach <tkach@reg.ru> | ||
| 85 | |||
| 86 | =back | ||
| 87 | |||
| 88 | =head1 COPYRIGHT AND LICENSE | ||
| 89 | |||
| 90 | This software is Copyright (c) 2014 by REG.RU LLC. | ||
| 91 | |||
| 92 | This is free software, licensed under: | ||
| 93 | |||
| 94 | The MIT (X11) License | ||
| 95 | |||
| 96 | =cut | ||