October 2013 Archives

PDL installation to Windows fail.

I try to install PDL to Windows, but I can't install PDL to Windows.

I try to install in Active Perl and Strawberry Perl.

1. Active Perl(5.16.3 32bit and PDL 2.007)

Installation of ppm is ok, but install by cpan fail.

cpan PDL

The reason is error of Devel-CheckLib-1.01. assertlib error popup and test fail.

Writing Makefile for Devel::CheckLib
Writing MYMETA.yml and MYMETA.json
cp lib/Devel/CheckLib.pm blib\lib\Devel\CheckLib.pm
C:\Perl-5.16.3\bin\perl.exe -MExtUtils::Command -e cp -- bin/use-devel-checklib blib\script\use-devel-chec…

Advantage of encupsulation in OO programming

I think there are two advantages in encapsulation.

Separation of implementation and API interfece

Advantage of encapsulation is that if you change the implementation,
you don't need to change api interface.

For example, see the following code. This is Mojo::Path source code.

package Mojo::Path;


sub trailing_slash { shift->_parse(trailing_slash => @_) }

sub _parse {
my ($self, $name) = (shift, shift);

unless ($self->{parts}) {
my $path = url_unescape delete($self->{path}) // '';
my $charset…

I try to use PDL::Stats, but Test failed.

I try to use PDL::Stats, but Test failed.
Reason is maybe same as the following



I try postderef and key-value slice in Perl 5.19.5

I try postderef in Perl 5.19.5. The following code don't work.

my $params = {
  foo => 1,
  bar => 2,
  baz => 3

my $new_params = {};
$new_params->%{'FOO', 'BAR'} = $params->%{'foo', 'bar'};

I expect {FOO => 1, BAR => 2}.
But left side assignment don't work. Is this specification or bug?

List shortage of Perl

I list shortage of Perl.

  • Object-Oriented feature in core

    For a long time, Perl don't support clean Object-Oriented feature in core. Ruby and Python can write OO programing clean, but Perl can't. This will be resolved by adding mop to core in the five years.
  • Web application

    Perl don't have famouse Web application. For example, PHP have Word Press, phpMyAdmin, Python have trac, Ruby have redmine, GitLab, but Perl don't have. I think we need to see web world.

Perl Tips - Perl Tutorial by Code Examples

I translate Perl Tips to English.

Perl Tips - Perl Tutorial by Code Examples

Perl have several easy to wrong points. If you use something of them, Perl programming will become smooth.

I want mop rest capability to define fast accessor

In Perl, accessor access is about 30 times slower than direct access. For example,

  # Accessor access
  # Direct access

"$obj->title" is about 30 times slower than "$obj->{title}". In current perl, we can't replace accessor access with direct access in general way.

but in mop, we can distinguish method and attribute. If so, we may replace accessor access with direct access. I want mop to rest capability to define this fast accessor.

Steven said "$self->title" is overhead, but if fast accessor is implemented, this is no …

GitPrep 1.3 is released - Smart HTTP, Basic authentication, Markdown syntax, and submodule support

I released GitPrep 1.3 at 2013/10/09. You can install portable GitHub system into Unix / Linux easily. It is second major release.

Because you can install GitPrep into your own server, you can create users and repositories without limit. You can use GitPrep freely because GitPrep is free software. You can also install GitPrep into shared rental server.

GitPrep (Document and Repository)

Features added in 1.3 are:

The proposal of separating method keyword from mop

method keyword is the syntax to write method simply.

  method clear {
    # You can omit "my $self = shift" by method keyword

And method keyword give Perl ability to know it is subroutine or method.

I think that method keyword isn't part of Meta Object Protocol even if mop use it as the part of module features. method keyword is independent feature.

If so, we can implement method keyword before mop release. Big jump is hard, small jump is good. If method keyword can work independent feature, I think it is good that method keyword is imp…

I translated "Debugger Manual" to English

I translated "Debugger Manual" to English

Debugger Manual

Perl Debugger is very useful tool. but I think yet many people don't know the way to use Perl debugger well. If you can use debugger well, Speed of development increase and decrease bugs. Let's use debugger more!

About Yuki Kimoto

user-pic I am Yuki Kimoto, Japanese Perl programmer. I create tutorial site in Japanese, and I create Perl modules and Perl Applications.