Subject: | [PATCH] Get App-CLI to work with bleadperl |
From the bleadperl changes file...
The C<warnings> pragma doesn't load C<Carp> anymore. That means that code
that used C<Carp> routines without having loaded it at compile time might
need to be adjusted; typically, the following (faulty) code won't work
anymore, and will require parentheses to be added after the function name:
use warnings;
require Carp;
Carp::confess "argh";
The following patch gets App::CLI to compile with bleadperl.
--- lib/App/CLI.pm.old 2006-10-25 08:58:56.000000000 -0500
+++ lib/App/CLI.pm 2006-10-25 08:59:40.000000000 -0500
@@ -44,7 +44,7 @@
sub new {
my $class = shift;
my $self = bless {}, $class;
- Carp::cluck if ref($_[0]);
+ Carp::cluck() if ref($_[0]);
%$self = @_;
return $self;
}
--- lib/App/CLI/Command.pm.old 2006-10-25 09:01:52.000000000 -0500
+++ lib/App/CLI/Command.pm 2006-10-25 09:01:18.000000000 -0500
@@ -1,6 +1,7 @@
package App::CLI::Command;
use strict;
use warnings;
+use Carp;
use Locale::Maketext::Simple;
=head1 NAME