Skip to content

Instantly share code, notes, and snippets.

View lestrrat's full-sized avatar

lestrrat lestrrat

View GitHub Profile
package Role1;
use Moose::Role;
has 'foo';
package Role2;
use Moose::Role;
has foo => (isa => 'Int');
package Role1;
use Moose::Role;
has 'foo';
package Role2;
use Moose::Role;
with 'Role1';
has foo => (is => 'ro', isa => 'Int');
sub vcl_fetch {
if (!obj.cacheable) {
pass;
}
if ( obj.status == 404 ) {
restart;
}
elseif (req.request == "GET" && obj.http.Content-Type ~ "html" ) {
esi; /* Do ESI processing */
use strict;
use HTML::FormHandler;
my $form = HTML::FormHandler->new(
field_list => {
fields => [
foo => { type => 'Text', required => 1 }
]
}
);
Creating initial data
DBIx::Class::Schema::populate(): DBI Exception: DBD::SQLite::st execute failed: person.registered may not be NULL [for Statement "INSERT INTO person ( active, born, email, gender, industry, interests, login, movies, music, name, occupation, pass, photo, timezone, views) VALUES ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? )"] at /var/www/vhosts/board.perlassociation.org/mojomojo/script/../lib/MojoMojo/Schema.pm line 59
--- a/lib/MojoMojo/Schema/Result/Content.pm
+++ b/lib/MojoMojo/Schema/Result/Content.pm
@@ -12,7 +12,7 @@ use Algorithm::Merge qw/merge/;
use String::Diff;
use HTML::Entities qw/encode_entities_numeric/;
-__PACKAGE__->load_components(qw/DateTime::Epoch UTF8Columns PK::Auto Core/);
+__PACKAGE__->load_components(qw/DateTime::Epoch TimeStamp UTF8Columns PK::Auto Core/);
__PACKAGE__->table("content");
__PACKAGE__->add_columns(
diff --git a/core/lib/Pixis/Web.pm b/core/lib/Pixis/Web.pm
index 4ae9700..a395577 100644
--- a/core/lib/Pixis/Web.pm
+++ b/core/lib/Pixis/Web.pm
@@ -474,6 +474,8 @@ sub handle_exception {
$error = Pixis::Web::Exception->new( message => "$error" );
}
+$c->log->error("FUCK ME");
+
use strict;
use utf8;
use XML::LibXML;
use Encode;
my $xml = encode('euc-jp', <<EOXML);
<?xml version="1.0" encoding="euc-jp"?>
<foo>
<bar attr="日本語">日本語のbar</bar>
</foo>
diff --git a/lib/Class/MOP/Package.pm b/lib/Class/MOP/Package.pm
index 3e24562..071d6df 100644
--- a/lib/Class/MOP/Package.pm
+++ b/lib/Class/MOP/Package.pm
@@ -4,7 +4,6 @@ package Class::MOP::Package;
use strict;
use warnings;
-use B;
use Scalar::Util 'blessed';
# モンキーパッチングは万人におすすめできる手法とは思えないのでやらないほうがいいと思うなぁ - lestrrat
# http://d.hatena.ne.jp/bingo_nakanishi_perl/20090711/1247331243
package Bar;
use strict;
sub new {
my($class, %args) = @_;
return bless { %args }, $class;
}