PrePAN

Sign in to PrePAN

PrePAN provides a place
to discuss your modules.

CLOSE

Requests for Reviews Feed

DBIx::Class::InflateColumn::Serializer::Role::HashContentAccessor Parameterized Moose role which provides accessor methods for values stored in a hash-like structure

This parameterized role provides methods to access values of a column that stores 'hash-like' data in a DBIx::Class-based database schema that uses Moose. It assumes that the (de)serializing of the column in done using something like DBIx::Class::InflateColumn::Serializer, i.e. that the inflated values are hash references that get serialized to something the database can store on INSERT/UPDATE.

This module provides the following advantages over using the inflated hashref directly:

  • If the column is nullable, you don't have to take care of NULL values yourself - the methods provided by this role do that already.
  • It's easy to provide a default when getting the value of a key which is not necessarily already stored in the column data.
  • If you remove the key-value-based column and replace it with dedicated columns in the future, you can simply remove the role and provide compatible accessors yourself. This allows you to keep the interface of the result class.

mstock@github 0 comments

ModisDownload Downloading MODIS satellite data

The first two levels of the server directories are cached and need to be loaded each time module is called. The module creates a download list for various MODIS products (e.g. https://lpdaac.usgs.gov/), which can be written to a file and passed to wget for downloading.

joergsteinkamp@github 1 comment

DBIx::Schema::Changelog Continuous Database Migration

A package which allows a continuous development with an application that hold the appropriate database system synchronously.

MOTIVATION

When working with several people on a large project that is bound to a database. If you there and back the databases have different levels of development.

You can keep in sync with SQL statements, but these are then incompatible with other database systems.

mziescha@github 2 comments

Git::Crypt Git::Crypt - Encrypt/decrypt sensitive files saved on public repos

Git::Crypt is a piece of software used to encrypt source code files. It can be useful for example to hide a CreditCard.pm class from the eyes of unauthorized. It can be used to encrypt all or some parts of the code. With githooks it can be triggered automatically/transparently upon commit.

Git::Crypt can be used to encrypt files before a git commit. That way its possible to upload encrypted files to public repositories. Git::Crypt encrypts line by line to prevent too many unnecessary diffs between encrypted commits.

Example diff produced of modified encrypted files:

index b1202fc..6c2f3e6 100644

--- a/lib/App/Crypted/CreditCard.pm

+++ b/lib/App/Crypted/CreditCard.pm

@@ -14,25 +14,29 @@ U2FsdGVkX19iyl3d3d3d3UjtB1nkCoDP

U2FsdGVkX19iyl3d3d3d3T3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YlLzsk=

+U2FsdGVkX19iyl3d3d3d3Tz+ZxmSz/rxgEmpWYlLzsk=

+U2FsdGVkX19iyl3d3d3d3Tz+ZxmSz/rxgEmpWYlLzsk=

+U2FsdGVkX19iyl3d3d3d3Tz+ZxmSz/rxgEmpWYlLzsk=

+U2FsdGVkX19iyl3d3d3d3Tz+ZxmSz/rxgEmpWYlLzsk=

+U2FsdGVkX19iyl3d3d3d3Tz+ZxmSz/rxgEmpWYlLzsk=

+U2FsdGVkX19iyl3d3d3d3Tz+ZxmSz/rxgEmpWYlLzsk=

U2FsdGVkX19iyl3d3d3d3Tz+ZxmSz/rx2ego3EqSeUk=

U2FsdGVkX19iyl3d3d3d3Tz+ZxmSz/rxsn4D6bxrGww=

U2FsdGVkX19iyl3d3d3d3Tz+ZxmSz/rxsn4D6bxrGww=

U2FsdGVkX19iyl3d3d3d3Tz+ZxmSz/rx2ego3EqSeUk=

U2FsdGVkX19iyl3d3d3d3T3HmAPM6gbK

U2FsdGVkX19iyl3d3d3d3XVxkdxldN7U

+U2FsdGVkX19iyl3d3d3d3T0XLptL7y1QEx/u7OaQVy2BZbX3SM7f2w==

+U2FsdGVkX19iyl3d3d3d3erugupayFMCneYosuHZNbl3jV0GvJ1HDg==

+U2FsdGVkX19iyl3d3d3d3T3HmAPM6gbK

+U2FsdGVkX19iyl3d3d3d3XVxkdxldN7U

U2FsdGVkX19iyl3d3d3d3X/cRzzeMPXS

hernan604@github 0 comments

App::FatPacker::Simple only fatpack a script

App::FatPacker::Simple or its frontend fatpack-simple helps you fatpack a script when YOU understand the whole dependencies of it.

MOTIVATION

App::FatPacker::Simple is a subclass of App::FatPacker. Let me explain why I wrote this module.

App::FatPacker brings more portability to Perl, that is totally awesome.

As far as I understand, App::FatPacker does 3 things: (a) trace dependencies for a script, (b) collects dependencies to fatlib directory and (c) fatpack the script with modules in fatlib.

As for (a), I often encountered problems. For example, modules that I don't want to trace trace, conversely, modules that I DO want to trace do not trace. Moreover a module changes interfaces recently, so we have to fatpack that module with new version, etc. So I think if you author intend to fatpack a script, YOU need to understand the whole dependencies of it.

As for (b), to locate modules in a directory, why don't you use carton or cpanm?

So the rest is (c) to fatpack a script with modules in directories, on which App::FatPacker::Simple concentrates.

That is, App::FatPacker::Simple only fatpacks a script with features:

  • automatically perl-strip modules
  • has option to exclude some modules

QUESTION

  • Can I use App::FatPacker namespace? If not, what name do you recommend?
  • Have you have problems with App::FatPacker? If so, is this module useful for you?
  • Any feedback is welcome.

Thanks.

shoichikaji@github 2 comments

LWP::JSON::Tiny use JSON natively with LWP objects

A lot of RESTful API integration involves pointless busy work with setting accept and content-type headers, remembering how Unicode is supposed to work and so on. This is a very simple wrapper around HTTP::Request and HTTP::Response that handles all of that for you.

There are three classes in this distribution:

  • HTTP::Request::JSON A subclass of HTTP::Request. It automatically sets the Accept header to application/json, and implements an add_content_json method which takes a JSONable data structure and sets the content-type.

  • HTTP::Response::JSON A subclass of HTTP::Response. It implements a json_content method which decodes the JSON contents into a Perl data structure.

  • LWP::UserAgent::JSON A subclass of LWP::UserAgent. It does only one thing: is a response has content-type JSON, it reblesses it into a HTTP::Response::JSON object.

Not finished, so design is liable to change subtly, but that's the basic gist. The documentation mentions other modules that don't quite do what I want.

My main question is whether it's arrogant to claim HTTP::Request::JSON, HTTP::Response::JSON etc. as class names; HTTP::Response::JSON::Tiny would be too much of a mouthful, though.

I'm trying to make the tests as Unicode-compliant and bullet-proof as possible. I'm not sure whether we need e.g. LWP::UserAgent::JSON->put_json

ETA: corrected previous use of $request->add_json_content to the simpler $request->json_content.

skington@github 2 comments

Net::IPFromZip uses the GeoIP libraries to get blocks of IP addresses from a ZIP

Looks through the GeoIP CSV files to find the blocks associated with given zip code.

jk33@github 3 comments

CBitcoin provides cbitcoin perl wrapper

This module lets coders create hierarchial deterministic keys/wallets, scripts, and transactions in perl. There are plans to add network functionality that is available in the original cbitcoin library.

favioflamingo@github 0 comments

Chef::Knife A thin wrapper around the knife cmd line tool

Is this a good idea?

kablamo@github 0 comments

DBIx::Struct DBIx::Struct - convenience SQL functions with Class::Struct-like row objects

Makes SQL queries from Perl data structures. It uses SQL::Abstract module to parse "where" and "order by" structures. This module does not try to map all possible SQL features to Perl structures but it greatly simplifies really simple and most often used scenarios. Complex queries are also possible, but sometimes it'd better to use real SQL.

Some usage examples can be found here: PEF Demo Article.pm

pef-secure@github 0 comments