| 1 | package WWW::BackpackTF::Currency; | ||||||||||
| 2 | |||||||||||
| 3 | 2 | ▶ | use 5.014000; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 4 | 2 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 5 | 2 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 6 | 2 | our $VERSION = '0.002001'; | |||||||||
| 7 | |||||||||||
| 8 | 0 | ▶ | sub new{ | ||||||||
|
Subroutine
new: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||
| 9 | 0 | my ($class, $name, $content) = @_; | |||||||||
| 10 | 0 | $content->{name} = $name; | |||||||||
| 11 | 0 | bless $content, $class | |||||||||
| 12 | } | ||||||||||
| 13 | |||||||||||
| 14 | 0 | ▶ | sub name { shift->{name} } | ||||||||
|
Subroutine
name: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 15 | 0 | ▶ | sub quality { shift->{quality} } | ||||||||
|
Subroutine
quality: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 16 | 0 | ▶ | sub priceindex { shift->{priceindex}} | ||||||||
|
Subroutine
priceindex: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 17 | 0 | ▶ | sub single { shift->{single} } | ||||||||
|
Subroutine
single: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 18 | 0 | ▶ | sub plural { shift->{plural} } | ||||||||
|
Subroutine
plural: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 19 | 0 | ▶ | sub round { shift->{round} } | ||||||||
|
Subroutine
round: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 20 | 0 | ▶ | sub craftable { shift->{craftable} eq 'Craftable' } | ||||||||
|
Subroutine
craftable: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 21 | 0 | ▶ | sub tradable { shift->{tradable} eq 'Tradable' } | ||||||||
|
Subroutine
tradable: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 22 | 0 | ▶ | sub defindex { shift->{defindex} } | ||||||||
|
Subroutine
defindex: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 23 | |||||||||||
| 24 | 0 | ▶ | sub quality_name { WWW::BackpackTF::QUALITIES->[shift->{quality}] } | ||||||||
|
Subroutine
quality_name: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 25 | 0 | ▶ | sub stringify { | ||||||||
|
Subroutine
stringify: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||
| 26 | 0 | my ($self, $nr) = @_; | |||||||||
| 27 | 0 | my $round = $self->round; | |||||||||
| 28 | 0 | $nr = sprintf "%.${round}f", $nr; | |||||||||
| 29 | 0 | ▶ | my $suf = $nr == 1 ? $self->single : $self->plural; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 30 | 0 | "$nr $suf"; | |||||||||
| 31 | } | ||||||||||
| 32 | |||||||||||
| 33 | 2 | 1; | |||||||||
| 34 | __END__ | ||||||||||