da2c2d501c140cc1fe30377b2b5a806f8c262aa3
3 use warnings FATAL
=> qw(all);
4 no if $] >= 5.018, warnings
=> "experimental::smartmatch";
5 use feature
qw(switch);
8 our @EXPORT_OK = qw( pl_to_mal );
9 use Scalar
::Util
qw(looks_like_number);
17 my @arr = map {pl_to_mal($_)} @$obj;
18 return Mal::List->new(\@arr);
22 foreach my $key (keys %$obj) {
23 $hsh->{$key} = pl_to_mal($obj->{$key});
25 return Mal::HashMap->new($hsh)
30 } elsif (looks_like_number($obj)) {
31 return Mal::Integer->new($obj);
33 return Mal::String->new($obj);