Sign in to PrePAN

PrePAN provides a place
to discuss your modules.


Requests for Reviews Feed

Device::SDS011 Module to work with SDS011 particulate matter sensor

Module to receive data from, and control SDS011 particulate matter sensor. The module uses Device::SerialPort for communicating with sensor. Laser Dust Sensor Control Protocol v1.3 is implemented.

OpossumPetya@github 0 comments

Shell::Run Execute shell commands using specific shell

The Shell::Run class provides an alternative interface for executing shell commands from a perl script

jo-37@github 4 comments

Debug::Filter::PrintExpr Convert comment lines to debug print statements

Debug::Filter::PrintExpr makes use of Filter::Simple to transform specially formed comment lines into print statements for various debugging purposes.

jo-37@github 0 comments

Keyword::TailRecurse A small module that added a tailRecurse keyword

Keyword::TailRecurse provides a tailRecurse keyword that does proper tail recursion that doesn't grow the call stack. It uses functionality added in Perl 5.14 so it's a Pure Perl solution (other current solutions use XS modules).

After using the module you can precede a function call with the keyword tailRecurse and rather adding a new entry on the call stack the function call will replace the current entry on the call stack.

note: Keyword::TailRecurse requires features Perl v5.14 and above.

Sub::Call::Tail compatability

If compatibility with Sub::Call::Tail is required then you can use the subCallTail flag to enable the tail keyword.

use Keyword::TailRecurse 'subCallTail';

sub fibonacci {
    my ( $count, $previous, $current ) = @_;

    return ( $previous // 0 ) if $count <= 0;

    $current //= 1;

    tail fibonacci ( $count - 1, $current, $previous + $current );

print fibonacci( 7 );

note: with Sub::Call:Tail compatibility enabled both the tailRecurse and tail keywords are available.


There's a couple of existing modules that use XS modules to provide similar functionality:

  • Sub::Call::Recur

    An XS module that provides a form of tail recursion - limited to recursing into the same function it's used from.

  • Sub::Call::Tail

    An XS module that provides a generic tail recursion.

jlcooper@github 3 comments

Metabolomics-FragNot Perl extension for fragment annotation in metabolomics

The first version allowing to : - create a fragment object - compare theoretical and experimental fragments - build a metabolite|contaminant bank object - produce result ouputs

The documentation and the POD should be reworked. The code is under an internal reviewing process.

This module is a part of a future computational toolbox useful for perl developers working in bioinformatics.

fgiacomoni@github 3 comments

WebService::Discord::Webhook A module for posting messages to Discord chat service

The Discord chat service allows server ops to create "webhook"s for their server. These are special secret URLs that allow an external client to post notifications into chat by making certain HTTP requests.

(For those unfamiliar with Discord, think "Slack, if it chugged a 12 pack of Mountain Dew".)

I created this Perl module as a way to help interact with Discord webhooks. The various functions of Webhooks are wrapped in Perl functions that execute with HTTP::Tiny, and data structures with JSON::PP. I tried to focus on ease of use and documentation.

This module posts messages to the Discord chat service, using their Webhook interface. Webhooks are a simple way to add post-only functions to external clients, without the need to create a full-fledged client or "bot".

Normally, Webhooks are used to issue a notification to chat channels when an external event from another site or service occurs, e.g. when a commit is made to a Git repository, a story is posted to a news site, or a player is fragged in a game.

An example Discord Webhook URL looks like this:

where the first magic number ("2237...5344") is the id and the second ("3d89...cf11") is the token.

For more information on Discord Webhooks, see the Discord API documentation located at

greg-kennedy@github 0 comments

App::Comment2pod generate pod documentation from comments above functions and package name

I have the started on a little utility which hopefully would increase the amount and quality of documentation in my perlscript and modules.

I did not find anything like this on CPAN, so I put this out here in case this might be handy for someone else.

It is probably more work to be done before this is ready for CPAN (like the name of the module), but I would love some feedback.

The current package contains a script, which could be used as:

cat | comment2doc

The result is written to stdout, so is useful to pipe the result into various utils, i.e

  • pod2man | man -l - see man page
  • pod2markdown
  • podselect

This util will be a nice starting point for further documentation.

The package also comes with a Dist::Zilla plugin

kjellkvinge@github 0 comments

Interact::Later Delay some tasks for later by dumping their data to disk

Can be used, for example, when you receive lots of POST requests that you don't want to proceed right now to save database load.

This module will fastly store the data content on disk (with Storable) without the need to use a database or a job queue. Assuming that Perl is fast at writing files to disk, we can hope good results. This is an experiment...

smonff@github 3 comments

PartialApplication A small module that handle partially applying parameters to functions

PartialApplilcation is a small module to handle partially applying parameters to functions - a common technique used in the functional programming style of coding.


partiallyApply( \&function, @parameters )

Partially applies the parameters to the function, giving a new function reference.

To partially apply parameters to an object method, pass a function reference to the method as the first parameter, the object instance as the second, followed by the parameters to be partially applied.

my $object = Class->new();

my $partiallyAppliedMethod = partiallyApply( \&Class::method, $object, 1, 2, 3 );

$partiallyAppliedMethod->(4, 5, 6);   # equivilant of $object->method(1, 2, 3, 4, 5, 6)


A function reference to the partially applied function.

partiallyApplyRight( \&function, @parameters )

Partially applies the parameters to the end of the function call - useful for when you're using named parameters and you want to make sure that the partially applied parameters are the ones used.

sub testSub {
    my %params = @_;

    print "$_ - $params{$_}\n" for keys %params;

my $partiallyAppliedFunction = partiallyApplyRight( \&testSub, asdf => 99 );

$partiallyAppliedFunction->(asdf => 100);   # outputs: asdf - 99


A function reference to the partially applied function.

partiallyApplyN( \&function, \@parameterBitmap, @parameters )

Partially applies the parameters based upon the parameterBitmap. An entry of 1 in the parameterBitmap will use a partially applied parameter and an entry of 0 will use a parameter from the call.

sub testSub {
    print join(", ", @_) ."\n";

my $partiallyAppliedFunction = partiallyApplyN( \&testSub, [ 1, 0, 1, 0 ], 1, 2, 3, 4, 5 );

$partiallyAppliedFunction->('a', 'b', 'c', 'd'); # outputs: 1, a, 2, b, 3, 4, 5, c, d

This does allow you to partially apply parameter to a method call without specifying the object instance to apply it to multiple instances.

my $partiallyAppliedMethod2 = partiallyApplyN( \&Class::method, [ 0, 1, 1, 1 ], 1, 2, 3 );

$partiallyAppliedMethod2->($object1, 4, 5); # equivilant to $object1->method(1, 2, 3, 4, 5)
$partiallyAppliedMethod2->($object2, 6, 7); # equivilant to $object2->method(1, 2, 3, 6, 7)


A function reference to the partially applied function.

jlcooper@github 2 comments

SMS::Send::RedSMS SMS::Send driver to send messages via

SMS::Send driver for RedSMS -

This is not intended to be used directly, but instead called by SMS::Send (see synopsis above for a basic illustration, and see SMS::Send's documentation for further information).

The driver uses the RedSMS HTTP API mechanism ( version) with JSON.

Be aware! The driver is intended only for (not version of API.

artamonoviv@github 0 comments