NAME

Games::Lacuna::Task::Utils - Helper functions for Games::Lacuna::Task

SYNOPSIS

    use Games::Lacuna::Task::Utils qw(class_to_name);

FUNCTIONS

No functions are exported by default.

class_to_name

Class name to moniker (lowercase, uderscore separated)

name_to_class

Moniker to class name (camel case, prefixed with Games::Lacuna::Task::Action::)

distance

 my $dist = distance($x1,$y1,$x2,$y2);

Calculates map distance

pretty_dump

 say pretty_dump($value);

Stringifies any value

normalize_name

Removes diacritic marks and uppercases a string for better compareability

parse_ship_type

 my $ship_type = parse_ship_type($human_type);

Converts a human ship name into the ship type

parse_date

Returns a epoch timestamp for the given timestamp from the api response

format_date

Formats an epoch timestamp