Latest Perl Introduction 2021 Movie

Perl version 5.36. isa operator. try catch syntax. enable warnings. use v5.36. use v7. The introduction of the members of Perl core team.

SPVM 0.9014 Release - add class, method, static keyword, omit SPVM:: namespace

I release SPVM 0.9014. Latest releases have some big changes.

add class, method, static keyword, omit SPVM:: namespace, and remove sub, self, keyword.

Before

# lib/SPVM/Point.spvm
package SPVM::Point {
  has x : int;
  has y : int;

  sub new : SPVM::Point () {
    return new SPVM::Point;
  }
  
  sub clear : void ($self : self) {
    $self->{x} = 0;
    $self->{y} = 0;
  }
}

After

# lib/SPVM/Point.spvm
class Point {
  has x : int;
  has y : int;

  static method new : Point () {
    return new Point;
  }
  
  method clear : void…

How to show UTF-8 at the Windows command prompt

If you windows Perl user, It is good to know How to show UTF-8 at the Windows command prompt .

How to show UTF-8 at the Windows command prompt

One liner is yet buggy, however UTF-8 showing is good in Windows command prompt.

Object::Pad Yuki Kimoto's 2021-08-25 - Default internal data structure of the object

Object::Pad Yuki Kimoto's 2021-08-25(I fix this entry because default internal data structure is array reference, not hash reference).

This time is default internal data structure of the object.

Default internal data structure of the Object::Pad is array reference.

use strict;
use warnings;
use Data::Dumper;

use Object::Pad;
 
class Point {
   has $x :param = 1;
   has $y :param = 2;
   
   method dump {
      # Default data structure is array reference
      warn Data::Dumper::Dumper $self;
   }
 
   method describe {
      print "A point at ($x, $y)\n";
   }
}

…

Object::Pad review Yuki Kimoto's 2021-08-23 - Constructor argument customize

In this time, I review constructor argument customize. BUILDARGS can customize contructer argument. It is good enough for me. I think existing library that receive hash references as argument will have a slight performance penalty because a BUILDARGS function call.


Point->new($x, $y)

use strict;
use warnings;

use Object::Pad;
 
cla…