Skip to content

Instantly share code, notes, and snippets.

View tokuhirom's full-sized avatar
💖
Focusing

Tokuhiro Matsuno tokuhirom

💖
Focusing
View GitHub Profile
=== MOP.xs
==================================================================
--- MOP.xs (revision 22684)
+++ MOP.xs (local)
@@ -127,10 +127,11 @@
/* BAH! constants are horrible */
key = HePV(he, keylen);
fqlen = pkglen + keylen + 3;
- fq = (char *)alloca(fqlen);
- snprintf(fq, fqlen, "%s::%s", package, key);
package Net::HTTPS::BlockingHack;
use strict;
use warnings;
use Net::HTTPS;
sub hack {
my ($class, $callback) = @_;
no strict 'refs';
if ($Net::HTTPS::SSL_SOCKET_CLASS eq 'Net::SSL') {
% perl -w -MO=Deparse -e '-d_'
Useless use of negation (-) in void context at -e line 1.
BEGIN { $^W = 1; }
-'d_';
-e syntax OK
require 'rexml/document'
source = <<"..."
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE member [
<!ENTITY a "&b;&b;&b;&b;&b;&b;&b;&b;&b;&b;">
<!ENTITY b "&c;&c;&c;&c;&c;&c;&c;&c;&c;&c;">
<!ENTITY c "&d;&d;&d;&d;&d;&d;&d;&d;&d;&d;">
<!ENTITY d "&e;&e;&e;&e;&e;&e;&e;&e;&e;&e;">
<!ENTITY e "&f;&f;&f;&f;&f;&f;&f;&f;&f;&f;">
1 <0> enter
2 <;> nextstate(main 2 -e:1) v
3 <0> pushmark s
4 <$> const[IV 0] s
5 <$> const[IV 100] s
6 <#> gv[*_] s
7 <{> enteriter(next->9 last->c redo->8) lKS
a <0> iter s
b <|> and(other->8) vK/1
8 <0> stub v
use strict;
use warnings;
use Encode;
use IO::Prompt qw/prompt/;
use Perl6::Say;
while (my $line = prompt('> ')) {
say encode_utf8 decode('utf-7', $line);
}
26140 (tokuhirom 2008-08-24): my $BUILDER = do {
26140 (tokuhirom 2008-08-24): my $builder_meta = Moose::Meta::Class->create_anon_class(
26140 (tokuhirom 2008-08-24): superclass => 'Moose::Meta::Class',
26140 (tokuhirom 2008-08-24): roles => [qw(
26140 (tokuhirom 2008-08-24): HTTP::Engine::Role::RequestBuilder
26140 (tokuhirom 2008-08-24): HTTP::Engine::Role::RequestBuilder::ParseEnv
26140 (tokuhirom 2008-08-24): HTTP::Engine::Role::RequestBuilder::HTTPBody
26140 (tokuhirom 2008-08-24): )],
26140 (tokuhirom 2008-08-24): cache => 1,
26140 (tokuhirom 2008-08-24): );
#!/usr/bin/perl
with Moose 0.55_01 & Class::MOP 0.64_6
### code.
use strict;
use warnings;
use Class::MOP;
use Moose::Meta::Class;
require Moose;
{
==> foo.pl <==
use strict;
use warnings;
use Moose::Meta::Class;
use Moose::Util;
my $builder_meta = Moose::Meta::Class->create(
't::Utils::HTTPRequestBuilder' => (
superclass => 'Moose::Meta::Class',
==> foo.pl <==
use strict;
use warnings;
use Moose::Meta::Class;
use Moose::Util;
my $builder_meta = Moose::Meta::Class->create(
't::Utils::HTTPRequestBuilder' => (
superclass => 'Moose::Meta::Class',
roles => [qw(