Skip to content

Instantly share code, notes, and snippets.

View autarch's full-sized avatar

Dave Rolsky autarch

View GitHub Profile
Parser
|
Multiplexer
/ \
LineWrapper HTMLStream
[emits Markdown] [emits HTML]
#!/usr/bin/env perl
use strict;
use warnings;
use Cwd qw( cwd );
use Git::Wrapper;
my ( $old, $new, $main, $remote ) = @ARGV;
One of C<Moo>'s most compelling features is its interoperability with
C<Moose>. When someone tries to use C<Moose>'s introspection API on a
C<Moo> class or role, it is transparently inflated into a C<Moose>
class or role. This makes it easier to incorporate C<Moo>-using code
into a C<Moose> code base and vice versa.
Installing debugger-linecache (1.1.2)
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
/home/autarch/.rvm/rubies/ruby-1.9.3-p392/bin/ruby extconf.rb
checking for vm_core.h... no
checking for vm_core.h... no
Makefile creation failed
**************************************************************************
No source for ruby-1.9.3-p392 provided with debugger-ruby_core_source gem.
**************************************************************************
has thing1 => (
is => 'ro',
lazy => 1,
default => sub { $_[0]->_things->[0] },
);
has thing2 => (
is => 'ro',
lazy => 1,
default => sub { $_[0]->_things->[1] },
sub _inlinify_css_rules {
my $self = shift;
my $html = shift;
my $dom = Mojo::DOM->new($html);
for my $selector ( sort keys %rules ) {
my $styler = sub {
my $element = shift;
my $style = $element->attrs('style') // q{};
sub _inlinify_css_rules {
my $self = shift;
my $html = shift;
my $dom = Mojo::DOM->new($html);
for my $selector ( sort keys %rules ) {
my $styler = sub {
my $element = shift;
my $style = $element->attrs('style') // q{};
sub _build_requested_ip_address {
my $self = shift;
my $ip = bind_path( '/:ip_address', $self->request()->path_info() );
return ( $ip && $ip eq 'me' ) ? $self->request->address : $ip;
}
#!/usr/bin/env perl
use strict;
use warnings;
use Perl::Tidy 20120714;
use Path::Class qw( file );
my $file = shift;
package Builder;
has input_data_provider => ( does => 'DataProvider' );
has output_data_writer => ( does => 'DataWriter' );
sub new {
# make a provider and accept