Data Structures and Algorithms Problems

Data Structures and Algorithms Problems

See this reddit post for discussion

Specifying dependencies for your CPAN distribution

Specifying dependencies for your CPAN distribution

[…] I’m going to show you how to specify dependencies for your CPAN distributions: the other Perl and CPAN modules that your distribution relies on.

Posts in this series:

  1. An introduction to CPAN distribution metadata
  2. Dependency phases in CPAN distribution metadata
  3. Specifying the type of your CPAN dependencies
  4. Specifying dependencies for your CPAN distribution

XS Mechanics

XS Mechanics is an article in five parts about XS. It explains what it is, why it is, how it works, and how to use it. It includes a complete, working example of an XS module, and a stub module that you can use as a starting point for your own code. It is an express goal of this article to provide the background and information necessary for you to write your own XS modules.

  1. Introduction – motivation, definitions, examples
  2. Architecture – the Perl interpreter, calling conventions, data representation
  3. Tools – h2xs, xsubpp, DynaLoader
  4. Modules – Math::Ackermann, Set::Bit
  5. Align::NW – Needleman-Wunsch global optimal sequence alignment

Getting started with XS

Getting started with XS

eXtendable Subroutines (XS) are subroutines written in C that are callable from Perl code. There are two common reasons you’d want to use XS: there is a C library you’d like to use with Perl, or you want to make a subroutine faster by processing it in C instead of Perl.

This tutorial will walk you through all the components needed to get up and running with a basic XS example.

See also:

Exploring Inline::C (Generating primes)

Exploring Inline::C (Generating primes)

I set out to figure out how to use Inline::C today, and thought I’d share the experience from the perspective of someone who was using Inline::C for the first time.

Dist::Zilla on Travis CI

Dist::Zilla on Travis CI

With Dist::Zilla (dzil), testing Perl projects on Travis CI can be a bit tricky. Here’s my approach.

Specifying the type of your CPAN dependencies

Specifying the type of your CPAN dependencies

In this article, we’ll cover the different types of dependencies and how you combine these with the phases (described in the previous article) to specify the dependencies (or prereqs) for your CPAN distribution.

Posts in this series:

  1. An introduction to CPAN distribution metadata
  2. Dependency phases in CPAN distribution metadata
  3. Specifying the type of your CPAN dependencies
  4. Specifying dependencies for your CPAN distribution

Version numbers should be boring

Version numbers should be boring

Unfortunately, version numbers in Perl aren’t boring and easy. Instead, they are complicated and confusing. Every Perl programmer needs to understand at least some of this complexity. Otherwise, you can make life difficult for yourself or others without realizing it.

The meaning of version 0.x versus 1.x

The meaning of version 0.x versus 1.x

If the first release of your CPAN module has version 0.01, then when should you release version 1.00, and what does that signify? For a good while now I’ve kinda of read 0.x as “I’m still kicking things around”, and you go to 1.x when things have settled down.

Dependency phases in CPAN distribution metadata

Dependency phases in CPAN distribution metadata

In this article I’ll drill into more detail at one critical component of a distribution’s metadata: dependencies, also known as prerequisites (usually shortened to “prereqs”). This is how you specify other CPAN modules that your distribution depends on.

Posts in this series:

  1. An introduction to CPAN distribution metadata
  2. Dependency phases in CPAN distribution metadata
  3. Specifying the type of your CPAN dependencies
  4. Specifying dependencies for your CPAN distribution