Skip to content

Instantly share code, notes, and snippets.

View lopnor's full-sized avatar

Nobuo Danjou lopnor

View GitHub Profile
use v6;
grammar Bar {
regex TOP { <header> [ <crlf> ** 2 <body> ]? }
token header { <pair> ** <crlf> }
regex crlf { \r?\n }
regex pair { <key=.body> ':'\s* <value=.body> }
token body { \w+ }
}
class Bar::Actions {
#!/usr/bin/env perl6
use v6;
module Foo {
my %escape;
for 0 .. 255 -> $c {
%escape{ chr($c) } = sprintf "%%%02X", $c;
}
sub bar (Int $value) {
#!/usr/env/bin perl6
use v6;
{
my $foo = 'Foo';
require $foo;
my $obj = $foo.new;
say $obj;
say $obj.bar;
}
- Filesys::Virtual::Plain
- you don't need 'login' for Plack::App::DAV (because it's very temporal)
- mkdir tries to chown, but you don't need to do it
- Net::DAV::Server
- just confusing
- need
- prop db
- lock db
test
#!perl
use strict;
use warnings;
use Web::Scraper;
use URI;
use YAML;
my $found = sub { 1 };
$| = 1;
name address
檀上伸郎 danjou@mac.com
Subject: テストメール
From: 檀上伸郎 <nobuo.danjou@gmail.com>
To: <?= $_[0]->{address} ?>
<?= $_[0]->{name} ?>様、こんにちは。
このメールはテストです。
-- nd
#!perl
use strict;
use warnings;
use utf8;
use Getopt::Long;
use Email::Sender::Simple;
use Email::Sender::Transport::SMTP;
use Email::MIME;
use Email::MIME::Modifier;
use Text::CSV_XS;
package Gif;
use 5.12.1;
use strict;
use warnings;
use Carp;
sub new {
my ($class, $file) = @_;
my $self = bless {}, $class;
$self->{file} = $file;