Changes between Version 3 and Version 4 of WhyPadreNeedsMoose


Ignore:
Timestamp:
Mar 8, 2012, 2:50:31 PM (2 years ago)
Author:
azawawi
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • WhyPadreNeedsMoose

    v3 v4  
    1 {{{ 
    2 #!perl 
    3 #!/usr/bin/perl 
    4  
     1{{{#!perl 
    52use v5.10; 
    63 
    74package Padre::Document; 
    85use Moose; 
    9  
    10 sub event_key_up { 
    11     say "event_key_up fired"; 
    12 } 
    13  
     6sub event_key_up { say "event_key_up fired"; } 
    147no Moose; 
    1581; 
     
    1710package NeedsKeyUpEvent; 
    1811use Moose::Role; 
    19  
    2012requires 'event_key_up'; 
    21  
    22 before 'event_key_up' => sub { 
    23     say q{before eats}; 
    24 };  
    25  
    26 after 'event_key_up' => sub { 
    27     say q{after event_key_up}; 
    28 };  
    29  
    30 no Moose::Role;  
     13before 'event_key_up' => sub { say q{before event_key_up}; }; 
     14after 'event_key_up'  => sub { say q{after event_key_up}; }; 
     15no Moose::Role; 
    31161; 
    3217 
     
    3924$q->event_key_up; 
    4025}}} 
     26 
     27=> 
     28 
     29{{{ 
     30before event_key_up 
     31event_key_up fired 
     32after event_key_up 
     33----- 
     34event_key_up fired 
     35}}}