Skip to content

Commit

Permalink
Fix pod bug, commented out at run time loading different style module…
Browse files Browse the repository at this point in the history
…, change return statement b/c of new spec. colomon++
  • Loading branch information
Takadonet committed Apr 20, 2013
1 parent 0ce2bbb commit db82d17
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
14 changes: 7 additions & 7 deletions lib/Text/Diff.pm
Original file line number Diff line number Diff line change
Expand Up @@ -85,11 +85,11 @@ multi sub text_diff(Inputs $a,Inputs $b,%options? = {'KEYGEN' => sub (*@a) {} })
$style = "Text::Diff::$style" if %internal_styles.exists($style);

#todo do not think the if statement below is working correctly
if ! $style.can( "hunk" ) {
#eval "require $style; 1" or die $@;
require $style or die "Cannot import hunk";
# if ! $style.can( "hunk" ) {
# #eval "require $style; 1" or die $@;
# require ::($style) or die "Cannot import hunk";

}
# }
$style = $style.eval.new();
# if ! ref $style && $style.can( "new" );
my $ctx_lines = %options.{'CONTEXT'};
Expand Down Expand Up @@ -152,7 +152,7 @@ multi sub text_diff(Inputs $a,Inputs $b,%options? = {'KEYGEN' => sub (*@a) {} })

$output_handler.( $style.file_footer( @a,@b, %options ) ) if $hunks;

return defined $output ?? $output !! $hunks;
return $output.defined ?? $output !! $hunks;
}


Expand Down Expand Up @@ -332,7 +332,7 @@ role Text::Diff::Base {
}


=begin
=begin pod
=head1 NAME
Expand Down Expand Up @@ -654,4 +654,4 @@ License v 2.0 or greater.
=cut

=end
=end pod
2 changes: 1 addition & 1 deletion t/outputs.t
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use v6;
use Test;
plan 8;
plan 7;
BEGIN
{
@*INC.push('lib');
Expand Down

0 comments on commit db82d17

Please sign in to comment.