| 1 | package WWW::BackpackTF::Item; | ||||||||||
| 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.002'; | |||||||||
| 7 | |||||||||||
| 8 | sub new{ | ||||||||||
| 9 | 0 | ▶ | my ($class, $name, $content) = @_; | ||||||||
|
Subroutine
new: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||
| 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 defindex { wantarray ? @{shift->{defindex}} : shift->{defindex}->[0] } | ||||||||
|
Subroutine
defindex: not called CC=2 SCAR=17.9
Pod
documented
Branch: 1 branch
| |||||||||||
| 16 | sub price { | ||||||||||
| 17 | 0 | ▶ | my ($self, $quality, $tradable, $craftable, $priceindex) = (@_, 6, 1, 1); | ||||||||
|
Subroutine
price: not called CC=4 SCAR=30.0
Pod
documented
| |||||||||||
| 18 | 0 | ▶ | $tradable = $tradable ? 'Tradable' : 'Non-Tradable'; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 19 | 0 | ▶ | $craftable = $craftable ? 'Craftable' : 'Non-Craftable'; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 20 | 0 | my $price = shift->{prices}->{$quality}->{$tradable}->{$craftable}; | |||||||||
| 21 | 0 | ▶ | defined $priceindex ? $price->{$priceindex} : $price->[0] | ||||||||
|
Branch: 1 branch
| |||||||||||
| 22 | } | ||||||||||
| 23 | |||||||||||
| 24 | 2 | 1; | |||||||||
| 25 | __END__ | ||||||||||