Blog Archives

Exploring Type::Tiny

Posted on July 31, 2018. Filed under: Uncategorized | Tags: , , , , , , , , , , , , , , , , , |

Type::Tiny is probably best known as a way of having Moose-like type constraints in Moo, but it can be used for so much more. This is a series of posts showing other things you can use Type::Tiny for. A seven part series posted to blogs.perl.org and perlmonks Using Type::Params for Validating Function Parameters — perl.org […]

Read Full Post | Make a Comment ( Comments Off on Exploring Type::Tiny )

Quieting Test::More

Posted on March 31, 2018. Filed under: Uncategorized | Tags: , , , , , , , |

Quieting Test::More stevieb asked: is there a way to have Test::More (or Test::Most, etc) only display failing tests? haukex replied with with following code:     use File::Spec;     Test::More->builder->output(File::Spec->devnull);

Read Full Post | Make a Comment ( Comments Off on Quieting Test::More )

Code Reuse

Posted on September 1, 2017. Filed under: Uncategorized | Tags: , |

Code Reuse Hi, I’m looking to do something like this: Package GlobalDefined; use strict; use warnings; our $PROJECT_GLOBAL_VAR1; … # Tools use Data::Dumper; … 1; Now, I’d like to add some kind of use/require so that the definitions that I include in global defines are taken in other packages/scripts. That means not only the global […]

Read Full Post | Make a Comment ( Comments Off on Code Reuse )

Re: Quieting Test::More

Posted on July 4, 2017. Filed under: Uncategorized | Tags: , , , , |

Re: Quieting Test::More # make Test::More only display fails # (also works with Test::Most) use File::Spec; Test::More->builder->output(File::Spec->devnull);

Read Full Post | Make a Comment ( Comments Off on Re: Quieting Test::More )

Exploring Inline::C (Generating primes)

Posted on April 30, 2017. Filed under: Uncategorized | Tags: , , , , , |

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.

Read Full Post | Make a Comment ( Comments Off on Exploring Inline::C (Generating primes) )

Wrapping a C shared library with Perl and XS

Posted on March 18, 2017. Filed under: Uncategorized | Tags: , , , , , , |

Wrapping a C shared library with Perl and XS This tutorial shows how to wrap a C shared library using XS and Perl (including creating a trivial test shared library). Also posted to PerlMonks where the discussion references InlineX::C2XS.

Read Full Post | Make a Comment ( Comments Off on Wrapping a C shared library with Perl and XS )

Send in a Perl aref to C, get back a Perl array (and using the generated XS)

Posted on January 27, 2017. Filed under: Uncategorized | Tags: , , , , |

Send in a Perl aref to C, get back a Perl array (and using the generated XS) This will show you how to pass a Perl array reference (aref) into a C function, convert the aref into a C array, work on it, then push it back onto the stack so the C function returns […]

Read Full Post | Make a Comment ( Comments Off on Send in a Perl aref to C, get back a Perl array (and using the generated XS) )

RFC: new.pm – a perl -e use/new shortener

Posted on December 25, 2016. Filed under: Uncategorized | Tags: , |

RFC: new.pm – a perl -e use/new shortener I tend to use perl one-liners extensively, mostly for testing purposes. In particular, I often load a module with a loooooooooong name only to instantiate it once. And it’s boooooooring to type the whole name twice. So I came up with an idea of a one-liner shortener […]

Read Full Post | Make a Comment ( Comments Off on RFC: new.pm – a perl -e use/new shortener )

perl XS – passing array to C and getting it back

Posted on August 18, 2016. Filed under: Uncategorized | Tags: , , , , |

perl XS – passing array to C and getting it back I’ve never really learned how to write XS – I just use the XS file that Inline::C creates.

Read Full Post | Make a Comment ( Comments Off on perl XS – passing array to C and getting it back )

VERSION section in POD

Posted on May 19, 2016. Filed under: Uncategorized | Tags: , , |

VERSION section in POD I use to include a VERSION section in the main module of the distributions uploaded to CPAN, but this comes at the risk of forgetting to update the number.

Read Full Post | Make a Comment ( Comments Off on VERSION section in POD )

« Previous Entries Next Entries »

Liked it here?
Why not try sites on the blogroll...