This document provides biographical information about Tetsuji Ogata, a Perl programmer from Okinawa, Japan. It mentions that he started learning Perl in 2003 and has contributed to various Perl projects. Ogata believes Perl is still relevant today despite competitors like Ruby and Go, and hopes to continue promoting and contributing to the Perl community.
The document discusses optimizing Perl code for prime number generation and Fibonacci number calculation. It explores different algorithms and data structures to improve performance, including memoization, struct of arrays, and avoiding unnecessary function calls in loops. Benchmark results show the optimizations significantly reduce execution times from hundreds of milliseconds to under 1 millisecond.
This document discusses the history and evolution of Perl web development from CGI scripts in the 1990s to modern web frameworks. It covers early technologies like CGI, mod_perl, FastCGI and introduces newer standards like PSGI/Plack that unify Perl web development. It emphasizes how PSGI/Plack abstracted web servers and allowed frameworks like Catalyst to flourish.
De 2012 a 2018, la persona asistió a la escuela cada a?o, con excepción de 2013 cuando también asistió a un campamento. Además de la escuela, la persona vivió en casa en 2014 y 2017, y asistió a un campamento en 2013.
This document discusses using Perl modules to cache website content from WordPress by storing it in an S3 bucket. It describes setting up a file watcher to sync the local uploads directory to S3 when files change. It also explains implementing a request handler and output filter to serve the cached content from S3 if available, or generate and cache the content if needed.
The document discusses various smart home and environmental monitoring devices, including a Netatmo weather station, Slack bot, and Nagios integration. It also mentions an Atmotube device that monitors carbon monoxide and volatile organic compounds, and notes concentrations of different compounds. Links are provided to product websites and documentation.
The document discusses the use of AUTOLOAD in Perl to dynamically compile and execute subroutines. It provides examples of how AUTOLOAD works in the CGI.pm module to dynamically generate CGI functions at runtime. It also summarizes how the Apache::LogFormat::Compiler module uses a similar approach to dynamically compile format strings into subroutines for logging request data.
The document discusses various mathematical concepts including trigonometric functions such as sine, cosine, and tangent. It covers trigonometric identities involving addition and subtraction formulas. It also discusses exponential functions, complex exponentials, and their relationship to trigonometric functions. Further, it briefly mentions applications of mathematics including GPS and Pokémon GO.
The document discusses gentle_unlink, a Perl script created by OGATA Tetsuji that slowly deletes files over time instead of immediately to avoid spikes in disk activity. It can delete files gradually in the background while the disk is idle. This helps improve performance and reduce wear when deleting large numbers of files at once, such as when removing old log files or database tables. The author recommends it as an alternative to commands like rm and truncate that delete files all at once.
The document contains the output from running the "strace rm" command on a file. The strace output lists each system call and signal that rm makes when deleting the file. It also contains discussions on using find/xargs, rsync, gentle_unlink, and other commands for deleting large numbers of files. Gentle_unlink is a Perl script that can slowly and safely delete files in batches over time or when processes are interrupted.
2. Attention for audience
? This slide is mainly written by Japanese, and
few English. In the future, I will write and
share this slide of English version, perhaps.
? I speach by Japanese language.
? If you do not known Japanese language,
please fun and feel from some Perl code
and few English description on this slide.
32. Echo Server (AnyEvent)
#!/usr/bin/env perl
use strict;
use warnings;
use AnyEvent;
use AnyEvent::Socket qw(tcp_server);
use AnyEvent::Handle;
use constant PORT => 9000;
my $cv = AnyEvnet->condvar;
my $echo_server = tcp_server undef, PORT, sub {
my $fh = shift;
my $hdl; $hdl = AnyEvent::Handle->new(
fh => $fh,
on_read => sub {
$hdl->push_write(delete $hdl->{rbuf});
},
);
};
$cv->recv;
35. Apache::Qpsmtpd
package Apache::Qpsmtpd;
use 5.006001;
use strict;
use warnings FATAL => 'all';
use Apache2::ServerUtil ();
use Apache2::Connection ();
use Apache2::Const -compile => qw(OK MODE_GETLINE);
use APR::Const -compile => qw(SO_NONBLOCK EOF SUCCESS);
use APR::Error ();
use APR::Brigade ();
use APR::Bucket ();
use APR::Socket ();
use Apache2::Filter ();
use ModPerl::Util ();
our $VERSION = '0.02';
sub handler {
my Apache2::Connection $c = shift;
$c->client_socket->opt_set(APR::Const::SO_NONBLOCK => 0);
die "$ENV{QPSMTPD_CONFIG} must be given" unless $ENV{QPSMTPD_CONFIG};
my $qpsmtpd = Qpsmtpd::Apache->new();
$qpsmtpd->start_connection(
ip => $c->remote_ip,
host => $c->remote_host,
info => undef,
conn => $c,
);
$qpsmtpd->run($c);
$qpsmtpd->run_hooks("post-connection");
$qpsmtpd->connection->reset;
return Apache2::Const::OK;
}
...