| line | stmt | bran | cond | sub | pod | time | code | 
| 1 | 8 |  |  | 8 |  | 36 | use strict; | 
|  | 8 |  |  |  |  | 14 |  | 
|  | 8 |  |  |  |  | 247 |  | 
| 2 | 8 |  |  | 8 |  | 32 | use warnings; | 
|  | 8 |  |  |  |  | 11 |  | 
|  | 8 |  |  |  |  | 399 |  | 
| 3 |  |  |  |  |  |  | package WebService::ChatWork::Message::Tag; | 
| 4 | 8 |  |  | 8 |  | 38 | use overload q{""} => \&as_string; | 
|  | 8 |  |  |  |  | 15 |  | 
|  | 8 |  |  |  |  | 73 |  | 
| 5 | 8 |  |  | 8 |  | 534 | use constant PRIMARY => "message"; | 
|  | 8 |  |  |  |  | 16 |  | 
|  | 8 |  |  |  |  | 632 |  | 
| 6 | 8 |  |  | 8 |  | 4647 | use Mouse; | 
|  | 8 |  |  |  |  | 208498 |  | 
|  | 8 |  |  |  |  | 39 |  | 
| 7 |  |  |  |  |  |  |  | 
| 8 |  |  |  |  |  |  | has message => ( is => "ro", isa => "Str" ); | 
| 9 |  |  |  |  |  |  |  | 
| 10 |  |  |  |  |  |  | sub new_with_primary { | 
| 11 | 5 |  |  | 5 | 0 | 10 | my $class = shift; | 
| 12 | 5 |  |  |  |  | 47 | my $self = bless { $class->PRIMARY => shift }, $class; | 
| 13 | 5 |  |  |  |  | 19 | return $self; | 
| 14 |  |  |  |  |  |  | } | 
| 15 |  |  |  |  |  |  |  | 
| 16 |  |  |  |  |  |  | sub new_with_attributes { | 
| 17 | 7 |  |  | 7 | 0 | 14 | my $class = shift; | 
| 18 | 7 |  |  |  |  | 36 | return bless { @_ }, $class; | 
| 19 |  |  |  |  |  |  | } | 
| 20 |  |  |  |  |  |  |  | 
| 21 |  |  |  |  |  |  | sub new { | 
| 22 | 12 |  |  | 12 | 1 | 22 | my $class = shift; | 
| 23 | 12 |  |  |  |  | 23 | my @args  = @_; | 
| 24 |  |  |  |  |  |  |  | 
| 25 | 12 | 100 |  |  |  | 73 | return $class->new_with_primary( @args ) | 
| 26 |  |  |  |  |  |  | if @args == 1; | 
| 27 |  |  |  |  |  |  |  | 
| 28 | 7 |  |  |  |  | 40 | return $class->new_with_attributes( @args ); | 
| 29 |  |  |  |  |  |  | } | 
| 30 |  |  |  |  |  |  |  | 
| 31 |  |  |  |  |  |  | sub as_string { | 
| 32 | 1 |  |  | 1 | 0 | 53 | my $self = shift; | 
| 33 | 1 |  |  |  |  | 4 | my $name = $self->PRIMARY; | 
| 34 | 1 |  |  |  |  | 15 | return $self->$name; | 
| 35 |  |  |  |  |  |  | } | 
| 36 |  |  |  |  |  |  |  | 
| 37 |  |  |  |  |  |  | 1; |