Skip to content

Latest commit

 

History

History
52 lines (33 loc) · 1.35 KB

Map.pod

File metadata and controls

52 lines (33 loc) · 1.35 KB

NAME

Fancy::Map maps within a map.

VERSION

This document describes Fancy::Map version 1.0.

SYNOPSIS

my $colors = [fancy_map(
               { 'before' => 'glass', 'after' => 'beads' },
               [map("sparkley $_", ('red', 'yellow', 'green', 'cyan', 'blue', 'magenta')), 'white', 'black', 'gray']
             )];

[
  'glass sparkley red beads',
  'glass sparkley yellow beads',
  'glass sparkley green beads',
  'glass sparkley cyan beads',
  'glass sparkley blue beads',
  'glass sparkley magenta beads',
  'glass white beads',
  'glass black beads',
  'glass gray beads'
];

DESCRIPTION

fancy_map can be exported and returns a list of mapped values from a list which already has a map in it. It takes three parameters. The first two are in a hash reference with the values to be mapped before and after the values of the list. The third is a reference to the list.

fancy_map( { 'before' => $before_value, 'after' => $after_value }, $list_with_a_map_in_it );

DEPENDENCY

Fancy::Map depends on Exporter.

AUTHOR

Lady Aleena

LICENSE AND COPYRIGHT

This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See perlartistic.

Copyright © 2020, Lady Aleena (aleena@cpan.org). All rights reserved.