Permalink
Browse files

various fixes possibly related to event role

  • Loading branch information...
1 parent 85aa776 commit 389ce3b946bf2b87d5ccb459372adaad74724afb @jberger committed Jan 29, 2013
Showing with 7 additions and 8 deletions.
  1. +4 −4 lib/Moodule/Build/Role/CBuilder.pm
  2. +2 −4 lib/Moodule/Build/Role/ShareDir.pm
  3. +1 −0 t/share_dir.t
@@ -3,7 +3,7 @@ package Moodule::Build::Role::CBuilder;
use Moo::Role;
use Moodule::Build::Utils 'split_like_shell';
-requires qw/log_verbose up_to_date/;
+requires qw/log_verbose/;# up_to_date/;
with 'Moodule::Build::Role::RScanDir';
@@ -111,16 +111,16 @@ sub compile_c {
sub process_support_files {
my $self = shift;
- my $source = $self->c_source;
+ my $c_source = $self->c_source;
my $files;
- push @{$p->include_dirs}, @$c_source;
+ push @{$self->include_dirs}, @$c_source;
for my $path (@$c_source) {
push @$files, @{ $self->rscan_dir($path, $self->file_qr('\.c(c|p|pp|xx|\+\+)?$')) };
}
foreach my $file (@$files) {
- push @{$p->objects}, $self->compile_c($file);
+ push @{$self->objects}, $self->compile_c($file);
}
}
@@ -2,7 +2,7 @@ package Moodule::Build::Role::ShareDir;
use Moo::Role;
-requires qw/dist_name/;
+requires qw/dist_name on_event/;
with 'Moodule::Build::Role::RScanDir';
use File::Spec;
@@ -81,9 +81,7 @@ has 'share_dir' => (
after 'new' => sub {
my $self = shift;
- if ($self->does('Moodule::Build::Role::PrereqHandler')) {
- $self->add_prereq_handler('_share_dir_prereq_handler');
- }
+ $self->on_event( 'prereqs' => '_share_dir_prereq_handler' );
#TODO if $self->does('Moodule::Build::Role::Builder')) {
if ( $self->can('build_elements') ) {
View
@@ -20,6 +20,7 @@ use Test::More;
with 'Moodule::Build::Role::ShareDir';
+ sub on_event { }
}
my $module = 'Simple::Share';

0 comments on commit 389ce3b

Please sign in to comment.