| 1 | package Thrift::Parser::Type::string; | ||
| 2 | |||
| 3 | =head1 NAME | ||
| 4 | |||
| 5 | Thrift::Parser::Type::string - string type | ||
| 6 | |||
| 7 | =cut | ||
| 8 | |||
| 9 | 6 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 10 | 6 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 11 | 6 | ▶ | use utf8; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 12 | 6 | ▶ | use base qw(Thrift::Parser::Type); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 13 | |||
| 14 | =head1 USAGE | ||
| 15 | |||
| 16 | Aside from standard L<Thrift::Parser::Type> methods, we are overloaded to return the plain string value. | ||
| 17 | |||
| 18 | =cut | ||
| 19 | |||
| 20 | 0 | ▶ | use overload '""' => sub { $_[0]->value }; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.2
Subroutine
__ANON__: not called CC=1 SCAR=0.2
| |||
| 21 | |||
| 22 | 0 | ▶ | sub values_equal { |
|
Subroutine
values_equal: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 23 | 0 | my ($class, $value_a, $value_b) = @_; | |
| 24 | 0 | return $value_a eq $value_b; | |
| 25 | } | ||
| 26 | |||
| 27 | 0 | ▶ | sub value_plain { |
|
Subroutine
value_plain: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 28 | 0 | my $self = shift; | |
| 29 | 0 | return $self->value; | |
| 30 | } | ||
| 31 | |||
| 32 | =head1 COPYRIGHT | ||
| 33 | |||
| 34 | Copyright (c) 2009 Eric Waters and XMission LLC (http://www.xmission.com/). All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. | ||
| 35 | |||
| 36 | The full text of the license can be found in the LICENSE file included with this module. | ||
| 37 | |||
| 38 | =head1 AUTHOR | ||
| 39 | |||
| 40 | Eric Waters <ewaters@gmail.com> | ||
| 41 | |||
| 42 | =cut | ||
| 43 | |||
| 44 | 6 | 1; | |