Sign in to PrePAN

PrePAN provides a place
to discuss your modules.


Requests for Reviews Feed

Sub::QuoteX::Utils Sugar for Sub::Quote

Sub::QuoteX::Utils provides a simplified interface to the process of combining Sub::Quote compatible code references with new code.

Sub::Quote provides a number of routines to make code more performant by inlining separate chunks of code into a single compiled subroutine.

When a chunk of code is compiled into a subroutine by Sub::Quote::quote_sub(), Sub::Quote keeps track of the code and any captured variables used to construct that subroutine, so that new code can be added to the original code and the results compiled into a new subroutine.

Sub::QuoteX::Utils makes that latter process a little easier.

djerius@github 0 comments

MojoX::Log::Any Use the current Log::Any adapter from Mojolicious

MojoX::Log::Any makes it easy to use a Log::Any::Adapter from within Mojolicious without getting in the way of the user.

When imported from within a Mojolicious application (of from within a package into which Mojolicious' app function has been exported), it sets that application's log attribute to a Log::Any::Proxy connected to whatever adapter is currently available.

When imported, the logger defaults to using Log::Any::Adapter::MojoLog, which seems to be the currently maintained adapter for Mojo::Log. Any parameters passed to the module's import function are passed as is to the get_logger function from Log::Any, to allow for user customisation and to maintain a coherent interface with that package.


There are numerous packages in the MojoX::Log namespace providing an interface with the various different logging mechanisms on CPAN; except Log::Any.

There is also a Log::Any adapter for Mojo::Log, which makes it possible to use that logger from any application using Log::Any; but not Mojolicious apps.

This package attempts to fill that void by offering Mojolicious applications an easy way to plug into the current Log::Any::Adapter (whatever it may be).

jjatria@github 0 comments

Mojo::IOLoop::Signal Mojo::IOLoop based, non-blocking signal handler

Mojo::IOLoop::Signal is a Mojo::IOLoop based, non-blocking signal handler.


  • Why does not Mojo::IOLoop officially support signals?
  • Do you think this module useful?
  • Any feedback is welcome.


skaji@github 0 comments

Alien::Boost Alien package to make the Boost libraries available to other modules at C level

To make available some C++ libraries from Perl, sometimes you need the boost libraries in order to compile the C++ bindings. In linux you can rely on the distro package system, but in windows there isn't package system.

Also the Boost libraries are very useful, for example:

Some modules include boost as part of the distribution: Boost::Geometry::Utils, Boost::Graph but I think it's better to manage Boost as another module dependency

This module aim to make easier to module authors to manage the boost library dependency.

pablrod@github 0 comments

Bio::SeqFeature::Generic::PrimerMap extends Bio::SeqFeature::Generic class to generate a PrimerMap

This module extends the Bio::SeqFeature::Generic module (part of the BioPerl core) to build a graphical map of primer sequences aligned along a base input DNA sequence (represented as a number line). The input should list the starting and ending coordinates (as base pairs) of a list of primers (see sample code above). It is a very straight forward module and I'm hoping to get feedback on code, naming conventions, and structure before submitting to CPAN.

dohalloran@github 2 comments

CCP::Xero Perl module to access Public and Private Xero Accounting Application API

We use this module for our internal integration with Xero accounting API and I am working to generalise it to release on CPAN.

Some good initial feedback from and other reading have given me some ideas about what needs to change in this module next.

The top level CCP was chosen because the main application this code was taken from uses it. There are other modules that I had envisaged releasing through CPAN covering diverse functionality however I am currently inclined to change my top level for this module to either WebService or Finance.

There is an existing Net::Xero module in CPAN and I have been unable to open a dialog with the author. This is the module that informed the initial code but it's not feature-rich enough I believe to be included in the Xero suggested SDKs at so I'd like to see a good Perl option in there.

pscott-au@github 0 comments

PerlSwagger Create RESTful webservices from OpenAPI (fka Swagger) 2.0 specification

Description (from README)

PerlSwagger is a simple to use web framework for RESTful webservices described with an OpenAPI 2.0 (formerly known as Swagger 2.0) specification.

The framework parses the specification on startup and creates a PSGI compatible app from it, which can be used with plackup.

Before calling any route handler, it checks the given parameters and only gives valid ones to the handler. Simple handlers don't have to know they are running as a webservice, as they just get a HashRef containing all the parameters and may return a HashRef as response body.

Handlers for routes are specified with the "x-handler" key in specification, which is something like this "My::Api::Code->handler_sub".


This module is work in progress. There are a lot of thing not yet working, like complete input validation or output validation (I think it would be good to HTTP 500 when invalid data is sent for output). The code may also need some refactoring.

PerlSwagger is developed as part of a bigger project, so features will be added as needed by me. If anyone else will be using it, I will also actively maintain PerlSwagger for use in other projects by the public.

LittleFox94@github 1 comment

Webservice::Freesound Perl wrapper around Freesound OAuth2 API

This module provides a Perl wrapper around the RESTful API.

Freesound is a collaborative database of Creative Commons Licensed sounds. It allows you to browse, download and share sounds. This Perl wrapper at present allows you 'read-only' access to Freesound, ie browse and download. Upcoming versions could provide upload, describe and edit your own sounds (though I expect it might just be easier to use their website for this).

The complete Freesound API is documented at

In order to use this Perl module you will need get an account at Freesound ( and then to register your application with them at Your application will then be given a client ID and a client secret which you will need to use to get OAuth2 authorisation.

The OAuth2 Dance is described at Freesound, and officially at RFC6749. It is a three step process as suggested above.

This module should look after the authorisation once done, ie when the expiry time arrives it can automatically refresh the tokens. The auth tokens are therefore kept as a file specified by "session_file", which should be read-only by you/www-data only.

When downloading a sound sample from Freesound a progress meter is available in "counter_file" which is useful in web contexts as a progress bar. Format of the file is : :: # for example "10943051:12578220:87", ie 87% of 12578220 bytes written. This is optional.

Also the download will download the sample file as its name and type suffix (some Freesound names have suffixes, some don't), so something like "/var/www/myapp/downloads/Pretty tune on piano.wav", ".../violin tremolo G5.aif" etc.

The query method allows you to put any text string into its parameter so that you have the full capabilities of Freesound search, filter, sort etc, as described here :

If used as part of a web app, then the process could be :

  • Check for session_file. If none then put up an iframe with the src set to output of $freesound-get_authorization_url();>
  • User clicks Authorise with a callback run (set in Freesound API credentials : (ie http://localhost/cgi-bin/mayapp/do_auth.cgi) which calls $freesound-get_oauth_tokens ($code))> - the code will be a parameter in the CGI (ie $q-param ('code')>).
  • Text search box on main webpage can then be used as inputs to $freesound-query> - the output formatted into HTML (from XML or json) as you wish. With Freesound you get a picture of the waveform and a low quality sound preview so you can engineer your website to show the waveform and have start/stop/pause buttons. Best not to replicate the entire Freesound website, as this might contravene their terms and conditions.
  • A Freesound sample will have an id. This can be used in $freesound-download ($id, $dir, $counter_file)>.
  • Show download progress bar by continually polling the contents of counter_file (with an Ajax call) and drawing a CSS bar. Actually downloads to your server, not the web-browser users Downloads directory.

CaesuraMedia@github 1 comment

Sort::Naturally::XS Perl extension for human-friendly ("natural") sort order


Natural sort order is an ordering of mixed (consists of characters and digits) strings in alphabetical order, except that digits parts are ordered as a numbers.

For example, standard machine-oriented alphabetical sort for list:

test21 test20 test10 test11 test2 test1

result to:

test1 test10 test11 test2 test20 test21

It isn't human-friendly, because test10 and test11 comes before test2. Natural sort order suggests the following:

test1 test2 test10 test11 test20 test21


  • Written in C and XS, so it's really fast
  • Support already exists Sort::Naturally module API
  • Fix some Sort::Naturally deviation from normal sort behavior, like "foobar" comes before "foo13'


See synopsis section

the_serval@twitter 3 comments