Acme-Glue
view release on metacpan or search on metacpan
lib/Acme/Glue.pm view on Meta::CPAN
package Acme::Glue;
use utf8;
use strict;
use warnings;
$Acme::Glue::VERSION = "2026.09";
=encoding utf8
=head1 NAME
Acme::Glue - A placeholder module for code accompanying a Perl photo project
=head1 VERSION
2026.09
=head1 DESCRIPTION
=begin HTML
<p><img src="https://images.squarespace-cdn.com/content/v1/60f40aa1942bba66cf802d7d/1626967232855-GP54O7LH9BAGBGAXJXUJ/05_yapc_eu_2016_f04.jpg?format=625w"
width="650" alt="Acme::Glue Photo" /></p>
=end HTML
Acme::Glue is the companion Perl module for a Perl photo project, the idea
for the photo project is to have each photo include a small snippet of code.
The code does not have to be Perl, it just has to be something you're quite
fond of for whatever reason.
"Glue" is a series of photos shot at Perl conferences and workshops in
Europe and America between 2015 and 2025. Perl was one of the programming
languages that bootstrapped a lot of internet based companies in the mid/late
1990s and early 2000s, sometimes sticking together disparate systems.
Perl has fallen out of favour as newer languages have taken its place;
however, it can still be found in many places and often running critical
infrastructure. The title is a metaphor not just for the language but also
for the shrinking of the community at the events the photos are shot at.
The full project edit (70 photos picked from approx 1,000) touches on the
aforementioned themes but also on the loss of books as learning material,
and the raise of AI.
=head1 SNIPPETS
Here are the snippets that may accompany the photo project
=head2 LEEJO (transform.pl)
#!/usr/bin/env perl
#
# transform an array of hashes into an array of arrays where each array
# contains the values from the hash sorted by the original hash keys or
# the passed order of columns (hash slicing)
my @ordered = $column_order
? map { [ @$_{ @{ $column_order } } ] } @{ $chaos }
: map { [ @$_{sort keys %$_} ] } @{ $chaos };
=head2 LEEJO (hopscotch.p6)
#!/usr/bin/env perl6
my @court = (
[ 'FIN' ],
[ 9 ,10 ],
[ 8 ],
[ 6 , 7 ],
[ 5 ],
[ 4 ],
[ 2 , 3 ],
[ 1 ],
);
my $skip = @court.[1..*].pick.pick;
my @play;
for @court.reverse -> $hop {
@play.push( $hop.map( *.subst( /^$skip$/,'ð«' ).list ) );
}
say @play.reverse.join( "\n" );
=head2 LEEJO (vec and pack examples from perldoc vec)
#!/usr/bin/env perl -wl
print <<'EOT';
0 1 2 3
unpack("V",$_) 01234567890123456789012345678901
------------------------------------------------------------------
EOT
for $w (0..3) {
$width = 2**$w;
for ($shift=0; $shift < $width; ++$shift) {
for ($off=0; $off < 32/$width; ++$off) {
$str = pack("B*", "0"x32);
$bits = (1<<$shift);
vec($str, $off, $width) = $bits;
$res = unpack("b*",$str);
$val = unpack("V", $str);
write;
}
}
}
format STDOUT =
vec($_,@#,@#) = @<< == @######### @>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
$off, $width, $bits, $val, $res
.
__END__
=head2 LEEJO (example from "How Perl Saved the Human Genome Project" complete with syntax error)
( run in 2.285 seconds using v1.01-cache-2.11-cpan-302cb4679cc )