The document discusses the lack of a standard boolean class in Perl 5 and proposes two new candidates - bool.pm and Types::Bool - to address this issue. It provides background on how booleans are typically implemented in Perl 5 without a native type, challenges with existing solutions, and why a standard boolean class would help with serialization and interoperability. The bottom line is that any new solution needs to work well with existing Perl modules.
This document summarizes Kenichi Ishigaki's presentations and activities related to Perl conferences from 2016 to 2018. It discusses his plans and experiences attending conferences like YAPC::Okinawa 2018, London Perl Workshop 2017, The Perl Conference 2017, YAPC::Asia 2016, and Perl QA Hackathon 2016. It also mentions talks he enjoyed and discussions he had on topics like PAUSE, JSON, and DBIx::Class at these various events.
Better detection of what modules are used by some Perl 5 codecharsbar
This document discusses Perl::PrereqScanner::NotQuiteLite, a module that detects which modules are used by Perl 5 code in a more accurate way than existing tools. It summarizes that Perl::PrereqScanner::NotQuiteLite can detect module requirements across a wide range of frameworks and syntax, including Moose, Catalyst, and Test::More. It also migrates the detection of module requirements from Perl::PrereqScanner to Perl::PrereqScanner::NotQuiteLite and describes how to update CPAN files and test them based on the module usage detected.
This document discusses recent changes and improvements made to the JSON and JSON::PP Perl modules, including fixing various issues, adding better and faster number detection, incremental parsing, and UTF-16/32 support in an experimental capacity. It also notes that specifying PERL_JSON_BACKEND=Cpanel::JSON::XS should now work properly and that a few incompatible changes may have been introduced between JSON::PP and Cpanel::JSON::XS.
Perl 5.24 was released in 2016 with several notable changes including hashbang redirection to Perl 6, removal of autodereferencing, and performance enhancements. Perl 6 development progressed with the release of the Christmas roast specification tests and Rakudo becoming more stable on MoarVM while work continued on implementations for other platforms like JVM and JavaScript. The Perl community continued to enhance CPAN and develop new features for Perl 6 like TWEAK submethods and lexical module loading.
This document summarizes recent changes and features of the JSON and JSON::PP Perl modules. It discusses changes made to address issues, add experimental features like incremental parsing and UTF-16/32 support, and loosen validation of the PERL_JSON_BACKEND setting. It also provides examples of sorting hash keys during encoding and converting values during decoding. Remaining unimplemented features like validating Unicode characters and supporting newer JSON standards are acknowledged.
What you need to remember when you upload to CPANcharsbar
Perlのモジュールを公開するときに気をつけておいた方がよい個のこと
This document provides tips for publishing Perl modules to CPAN. It discusses things to be aware of such as distributions being permanently archived on BackPAN even if deleted, CPAN accepting almost anything, and several testing services that can improve modules like PAUSE, CPAN Testers, CPANTS, and more. It also covers best practices for metrics evaluated by these services around availability, integrity, file layout, prerequisites and more. Developers are encouraged to use better tools from the Perl Toolchain Gang to avoid issues.
UnQLite is an embedded key-value and document-oriented database with a simple API similar to SQLite. It uses a BSD license and supports cross-platform usage. Benchmarks show it has comparable or better performance than SQLite, Berkeley DB and other databases for common operations like storing, fetching, and iterating over large amounts of data. The developer is working on adding new storage engines to UnQLite.
This document discusses extending Perl with C libraries using XS. It explains that XS provides an interface between C and Perl by handling data conversion between their different types. The document outlines the components of a basic XS file and how it is compiled. It also discusses typemaps which define how C types are mapped to Perl types to allow values to be passed between the languages. Further details are provided on developing the XS interface and common tools like h2xs and a new converter tool.
This document appears to be an annual report from 2012 that includes:
1) A welcome from Kenichi Ishigaki and information about YAPC::Asia 2012.
2) Lists of the top 10 qualitative Japanese authors for 2012 and statistics on new CPAN authors in Japan and worldwide from 2000-2012.
3) Charts showing trends in the number of releases by Japanese authors, worldwide releases, active authors in Japan, and active authors worldwide from 2000-2012.
4) A thank you message at the end.
This document summarizes Kenichi Ishigaki's presentation on DBD::SQLite recipes, issues, and plans at YAPC::Asia 2012. The presentation covered:
1. Ten recipes for common SQLite tasks like bulk inserts, in-memory databases, table alterations, database attachments, hooks, unicode, and custom extensions.
2. Ten issues and plans for the DBD::SQLite module, including debates around the default transaction mode, refactoring the execute method, optimization efforts, and compatibility with different compilers and platforms like iOS.
3. Questions and suggestions from the audience were welcomed on improving recipes, resolving issues, and advancing plans and roadmaps for DBD::SQLite.
- Kenichi Ishigaki created a list of Japanese CPAN authors and a script to maintain it since there was a need to more easily track Japanese authors.
- He launched a website, acme.cpanauthors.org, to feature CPANTS info but it had no data since the official CPANTS site was down. He set up his own private repository to store the data.
- Work is still needed on CPANTS including adding tests, making the processing faster, fixing broken metrics, and integrating more external data sources. The tools and resources are now in place to continue improving CPANTS.
CPANTS is the CPAN Testing Service that tests Perl modules on CPAN to ensure quality. It runs 24 core tests plus 10 extras on modules to check issues like extractability, strict pragma use, POD documentation tests, dependency on other modules, and more. The tests help attract attention to quality problems. CPANTS data is now mirrored at cpants.charsbar.org since the original site was not being maintained. The speaker has been refactoring the mirror and adding improvements like renewed module metrics and queries. Future work includes faster testing, better UI, and JSON API.
The document discusses PPM (Perl Package Manager) which allows installing pre-processed Perl packages more quickly than installing from CPAN. It provides an overview of the history and development of PPM. It also describes tools for creating PPM packages and alternatives for packages not available through PPM such as building packages yourself or using another module.
IoT Devices Compliant with JC-STAR Using Linux as a Container OSTomohiro Saneyoshi
Security requirements for IoT devices are becoming more defined, as seen with the EU Cyber Resilience Act and Japan’s JC-STAR.
It's common for IoT devices to run Linux as their operating system. However, adopting general-purpose Linux distributions like Ubuntu or Debian, or Yocto-based Linux, presents certain difficulties. This article outlines those difficulties.
It also, it highlights the security benefits of using a Linux-based container OS and explains how to adopt it with JC-STAR, using the "Armadillo Base OS" as an example.
Feb.25.2025@JAWS-UG IoT
12. 正規表現中の
「 C 」文字クラ
スは削除文字列の内部表現を変更できたりするので 5.20 で廃止
my $c = "N{U+3042}"; # あ
say unpack "H*", $c; # e38182
$c =~ /(.)/; say sprintf "%x", $1; # 3042
$c =~ /(C)/; say sprintf "%x", $1; # e3
$c =~ s/(CC)C/$1x84/; say $c; # い
my $c = "N{U+3042}"; # あ
say unpack "H*", $c; # e38182
$c =~ /(.)/; say sprintf "%x", $1; # 3042
$c =~ /(C)/; say sprintf "%x", $1; # e3
$c =~ s/(CC)C/$1x84/; say $c; # い
13. :utf8 レイヤ付きハンドルへの
sysread()/syswrite() は廃止
これも同じく文字列境界を無視してしまうので
use strict;
use warnings;
open my $fh, '<:encoding(cp932)', 'test.txt';
# こちらは正しく「文字単位」
read($fh, my $buf, 3);
# こちらは「文字単位」にならないので警告
sysread($fh, my $buf, 3);
use strict;
use warnings;
open my $fh, '<:encoding(cp932)', 'test.txt';
# こちらは正しく「文字単位」
read($fh, my $buf, 3);
# こちらは「文字単位」にならないので警告
sysread($fh, my $buf, 3);
23. 正規表現中の { の扱いが変更に
5.16 で廃止、 5.22 以降警告が出ていたのが死ぬように
$foo =~ /d{1,10}/; # ok
$foo =~ /d{1}/; # ok
$foo =~ /something{}/; # 5.26 ではエ
ラー
$foo =~ /something{/; # 5.26 ではエ
ラー
$foo =~ /something[{]/; # ok
$foo =~ /something{/; # ok
$foo =~ /d{1,10}/; # ok
$foo =~ /d{1}/; # ok
$foo =~ /something{}/; # 5.26 ではエ
ラー
$foo =~ /something{/; # 5.26 ではエ
ラー
$foo =~ /something[{]/; # ok
$foo =~ /something{/; # ok
$foo =~ /{}/; # これも ok
24. レキシカルサブルーチン
が正式化
5.18 で実験的に導入。詳しくは perldoc perlsub
{
sub whatever {
my $x = shift;
my sub inner {
... do something with $x ...
}
inner();
}
}
{
sub whatever {
my $x = shift;
my sub inner {
... do something with $x ...
}
inner();
}
}
25. ${^ENCODING} は削除
2015 年の YAPC で Yappo さんがおっしゃっていた通り
× use encoding 'cp932';
○ use encoding 'cp932', Filter => 1;
× use encoding 'cp932';
○ use encoding 'cp932', Filter => 1;
45. package Point {
use Moxie;
extends 'Moxie::Object';
has '$!x' => sub { 0 };
has '$!y' => sub { 0 };
sub BUILDARGS : init_args(
x => '$!x',
y => '$!y',
);
sub x : ro('$!x');
sub y : ro('$!y');
sub set_x : wo('$!x');
sub set_y : wo('$!y');
sub clear ($self) {
@{ $self }{'$!x', '$!y'} = (0, 0);
}
sub pack ($self) {
+{ x => $self->x, y => $self->y }
}
}
package Point {
use Moxie;
extends 'Moxie::Object';
has '$!x' => sub { 0 };
has '$!y' => sub { 0 };
sub BUILDARGS : init_args(
x => '$!x',
y => '$!y',
);
sub x : ro('$!x');
sub y : ro('$!y');
sub set_x : wo('$!x');
sub set_y : wo('$!y');
sub clear ($self) {
@{ $self }{'$!x', '$!y'} = (0, 0);
}
sub pack ($self) {
+{ x => $self->x, y => $self->y }
}
}
https://github.com/stevan/p5-Moxie/blob/master/t/000-samples/001-point.t
49. $ perl6 -v
This is Rakudo version 2017.02 built on MoarVM version 2017.02
implementing Perl 6.c.
This is Rakudo version 2017.02 built on MoarVM version 2017.02
implementing Perl 6.c.
• say $*PERL.version; # v6.c
• say $*PERL.name; # Perl 6
• say $*PERL.compiler.version; # v2017.02
• say $*PERL.compiler.name; # rakudo
• say $*VM.version; # v2017.02
• say $*VM.name; # moar
• say $*PERL.version; # v6.c
• say $*PERL.name; # Perl 6
• say $*PERL.compiler.version; # v2017.02
• say $*PERL.compiler.name; # rakudo
• say $*VM.version; # v2017.02
• say $*VM.name; # moar
use 文で制御できるのは v6.c の部分だけ
50. 最終的な目標をすべて達成できて
いるわけではありません
ROAST から切り出される各実装向けのテストにはいろい
ろと分岐なども残っています
given $*DISTRO.name {
when "macosx" {
#?rakudo.jvm skip "file system events NYI? RT #124828"
subtest &macosx, "does watch-path work on Mac OS X";
}
default {
pass "Nothing reliable to test yet";
}
}
given $*DISTRO.name {
when "macosx" {
#?rakudo.jvm skip "file system events NYI? RT #124828"
subtest &macosx, "does watch-path work on Mac OS X";
}
default {
pass "Nothing reliable to test yet";
}
}
perl6/roast/S17-supply/watch-path.t
(for IO::Notification.watch-path)
57. TWEAK サブメソッ
ドPerl 6 の BUILD は Moose の BUILDARGS 相当
use v6.c;
class Foo {
has ($.x, $!id);
submethod BUILD() {
$!id = $!x * 2; # $!x is not set yet
}
method generated_id { $!id }
}
say Foo.new(x => 1).generated_id; # 0
use v6.c;
class Foo {
has ($.x, $!id);
submethod BUILD() {
$!id = $!x * 2; # $!x is not set yet
}
method generated_id { $!id }
}
say Foo.new(x => 1).generated_id; # 0
58. TWEAK サブメソッ
ド…こう書いてもよいのですが
use v6.c;
class Foo {
has ($.x, $!id);
submethod BUILD(:$x) {
$!id = $x * 2;
}
method generated_id { $!id }
}
say Foo.new(x => 1).generated_id; # 2
use v6.c;
class Foo {
has ($.x, $!id);
submethod BUILD(:$x) {
$!id = $x * 2;
}
method generated_id { $!id }
}
say Foo.new(x => 1).generated_id; # 2
59. TWEAK サブメソッ
ドMoose の BUILD 相当のものが新設されました
use v6.c; # since 2016.11 (or v6.d when ready)
class Foo {
has ($.x, $!id);
submethod TWEAK() { # called after BUILDs
$!id = $!x * 2;
}
method generated_id { $!id }
}
say Foo.new(x => 1).generated_id; # 2
use v6.c; # since 2016.11 (or v6.d when ready)
class Foo {
has ($.x, $!id);
submethod TWEAK() { # called after BUILDs
$!id = $!x * 2;
}
method generated_id { $!id }
}
say Foo.new(x => 1).generated_id; # 2
60. モジュールの読み込みが
レキシカルスコープに
A.pm6
use A;
class B {}
use A;
class B {}
use B;
A.new; # die since 2017.01
use B;
A.new; # die since 2017.01
• これによってアプリ内
で複数バージョンの同
じモジュールを利用す
ることができるように
• Rakudo のバージョンを
上げてもモジュールの
再インストールは不要
• rakudobrew で切り替え
るよりシステムにイン
ストールしてしまう方
class A {}class A {}
B.pm6
lexical_module_load.pl6
61. Unicode サポート
say 「こんにちはこんにちは」 ; # 半角「 」
のみ
my $ 税率 = 1.08; ($ 金額 ×$ 税率 ).say;
say 100² ÷ ⅕; # 50000;
say 100 ** 2 / unival("x[2155]");
say 「こんにちはこんにちは」 ; # 半角「 」
のみ
my $ 税率 = 1.08; ($ 金額 ×$ 税率 ).say;
say 100² ÷ ⅕; # 50000;
say 100 ** 2 / unival("x[2155]");