NAME
Acme::ELLEDNERA::Utils
Done for the sake of learning how to create modules :)
VERSION
Version 0.04
SYNOPSIS
This module allows you to do addition and shuffle an array.
use Acme::ELLEDNERA::Utils qw( sum shuffle );
# or
# use Acme::ELLEDNERA::Utils ":all";
# addition
$sum = sum(1, 2, 3);
$sum = sum(1.2, 3.14159);
$sum = sum( qw(t1 10 t2 5 6) ); # only performs 10+5+6 = 21
# shuffling an array
@ori_nums = (1, 3, 5, 7, 9, 11, 13, 15);
@shuffled = shuffle(@ori_nums);
EXPORT
None by default
SUBROUTINES
sum( LIST )
Obtains the sum of a list of numbers. If no numbers are passed in, it will return undef
. A mixture of numbers and non-numerics will work too. However, complex and scientific numbers are not supported.
The sum
subroutine in version 0.03 is broken
shuffle( LIST )
Shuffle a list of anything :) This subroutine uses the Fisher Yates Shuffle algorithm. I just copied and pasted (most of) them from https://perldoc.perl.org/perlfaq4#How-do-I-shuffle-an-array-randomly?
Unlike the original implementation, this subroutine takes in an actual array and returns a new shuffled one. It is the same one as in the of Intermediate Perl (2nd edition)
SEE ALSO
List::Util
AUTHOR
Raphael Jun Jie Jong, <raphael.jongjj at gmail.com>
BUGS
Please report any bugs or feature requests to bug-acme-ellednera-utils at rt.cpan.org
, or through the web interface at https://rt.cpan.org/NoAuth/ReportBug.html?Queue=Acme-ELLEDNERA-Utils. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
SUPPORT
You can find documentation for this module with the perldoc command.
perldoc Acme::ELLEDNERA::Utils
You can also look for information at:
RT: CPAN's request tracker (report bugs here)
https://rt.cpan.org/NoAuth/Bugs.html?Dist=Acme-ELLEDNERA-Utils
CPAN Ratings
Search CPAN
ACKNOWLEDGEMENTS
Besiyata d'shmaya, Intermediate Perl 2nd Edition
LICENSE AND COPYRIGHT
This software is Copyright (c) 2021 by Raphael Jun Jie Jong.
This is free software, licensed under:
The Artistic License 2.0 (GPL Compatible)