Skip to content

Instantly share code, notes, and snippets.

View nperez's full-sized avatar

nperez nperez

  • Amsterdam, The Netherlands
View GitHub Profile
I just had a wild thought. Moose-ifying POE::Filters means that if you are stacking filters and require a thin
shim between filters, you no longer need to insert a whole new filter. Simply subclass the filter that needs its
data slightly transformed, and apply advice to the get_one()/put() methods, then insert where you would the
original filter. Very clean.
Stolen from Kent Cowgill
" Settings for perl stuff.
189 " perltidy things! true, perl-support provides this, but i had gotten
190 " used to hitting "_t" to run my source through perltidy.
191 nnoremap <silent> _t :%!perltidy -q<Enter>
192 vnoremap <silent> _t :!perltidy -q<Enter>
193 " instead of man pages, read perldoc on hitting K over a keyword!
194 autocmd BufRead,BufNewFile *.pm,*.pl,*.t,*.ptml setlocal keywordprg=perldoc\ -f
195 " type "#!P<CR>" in insert mode, and it expands to a default perl fileheader
I have no idea what you are talking about, but it seems angsty. Let me get a couple of points straight:
"as Perl software was not simply and practically written, and was often faulty despite a extensive testing and distribution system"
So you decided that the CPAN sucked and so you wrote your own? What faults? What's not simple or practical to one of the largest online collections of software modules in the world that adheres to the free/open source software ideals?
Ever heard of Not Invented Here? You suffer from that significantly.
Then you go on to berate an open source developer because he won't recognize your unbound awesomeness and intellectual prowess. Because obviously, you have the answer to all of the projects problems.

Moose Hackathon Agenda

  • Traits in C::MOP
  • removing T::E from Moose/MOP
    • adding lives_ok/dies_ok to Test::Moose
  • merging C::MOP and Moose
  • Antlers
  • merging MooseX modules into Moose and/or core
    • MX::AH into core
  • MooseX::Traits -> Moose::Traits
use MooseX::Declare;
class Foo
{
method import (ClassName $class: ArrayRef :$traits)
{
Foo->meta->make_mutable;
foreach my $trait (@$traits)
{
with $trait;
diff --git a/lib/MooseX/Declare/Syntax/Keyword/Role.pm b/lib/MooseX/Declare/Syntax/Keyword/Role.pm
index 889cf0a..4b7944a 100644
--- a/lib/MooseX/Declare/Syntax/Keyword/Role.pm
+++ b/lib/MooseX/Declare/Syntax/Keyword/Role.pm
@@ -66,7 +66,7 @@ sub add_parameterized_customizations {
my @vars = map {
does_role($_, Placeholder)
? ()
- : [$_->variable_name, $_->label, $_->meta_type_constraint]
+ : [$_->variable_name, $_->label, $_->meta_type_constraint, $_->default_value]
use 5.010;
use MooseX::Declare;
class Blarg
{
use MooseX::NonMoose;
use Template::Declare::Tags('HTML');
extends 'Template::Declare';
method foo(ClassName $class: Int $thing) { div { p { "My thing is: $thing" } } }
use 5.010;
use MooseX::Declare;
role Template::Declare::AutoForm::Entity(CodeRef :$tag)
{
method preamble(ClassName $name: Ref $arg?) { }
method attributes(ClassName $name: Ref $arg?) { }
method guts(ClassName $name: Ref $arg?) { }
method epilogue(ClassName $name: Ref $arg?) { }
--- /home/nicholas/installed/perl5.10.1/lib/5.10.1/Text/Balanced.pm 2009-11-20 15:38:11.085852509 -0600
+++ Balanced.pm 2009-11-20 15:38:00.451977193 -0600
@@ -643,9 +643,10 @@
sub extract_quotelike (;$$)
{
- my $textref = $_[0] ? \$_[0] : \$_;
+ my ($text, $preamble) = @_;
+ my $textref = \$text;
my $wantarray = wantarray;
==== Patch <moosify-validation-configurability.patch> level 1
Source: 992f488a-d630-404b-95f9-f7d0fdf28443:/local/ccda:4220 [local]
Target: 4ad37cd2-5fec-0310-835f-b3785c72a374:/Catalyst-Controller-DBIC-API/1.003/trunk:12230 [mirrored]
(http://dev.catalyst.perl.org/repos/Catalyst/Catalyst-Controller-DBIC-API/1.003/trunk)
Log:
r4216@nicklaptop: nicholas | 2009-12-02 22:33:02 -0600
Mirror/copy Catalyst::Controller::DBIC::API
r4217@nicklaptop: nicholas | 2009-12-06 17:45:04 -0600
checkpoint
r4220@nicklaptop: nicholas | 2009-12-09 12:26:12 -0600