Blob Blame History Raw
From 08f7400d0f47dceec16a72d7d42453026613a853 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com>
Date: Mon, 30 Nov 2015 14:31:21 +0100
Subject: [PATCH] Restore compatibility with App-Cmd-0.328
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

App-Cmd-0.328 something changed and that broke MouseX::App::Cmd.

This patch is similar to change in MooseX-App-Cmd-0.32. It adds
dependency on MouseX::NonMoose.

CPAN RT#107068

Petr Písař: Ported to 0.30.

Signed-off-by: Petr Písař <ppisar@redhat.com>
---
 lib/MouseX/App/Cmd.pm | 20 ++------------------
 1 file changed, 2 insertions(+), 18 deletions(-)

diff --git a/lib/MouseX/App/Cmd.pm b/lib/MouseX/App/Cmd.pm
index d9bc2bc..30446bd 100644
--- a/lib/MouseX/App/Cmd.pm
+++ b/lib/MouseX/App/Cmd.pm
@@ -3,27 +3,11 @@ use 5.006;
 package MouseX::App::Cmd; # git description: v0.29-32-g69e2d04
 use Mouse;
 use English '-no_match_vars';
-use File::Basename ();
+use MouseX::NonMoose;
+extends 'App::Cmd';
 
 our $VERSION = '0.30'; # VERSION
 use namespace::autoclean;
-extends 'Mouse::Object', 'App::Cmd';
-
-sub BUILDARGS {
-    my ( undef, @arg ) = @_;
-    return {} if !@arg;
-    return { arg => $arg[0] } if 1 == @arg;
-    return {@arg};
-}
-
-sub BUILD {
-    my $self  = shift;
-    my $class = blessed $self;
-    $self->{arg0}      = File::Basename::basename($PROGRAM_NAME);
-    $self->{command}   = $class->_command( {} );
-    $self->{full_arg0} = $PROGRAM_NAME;
-    return;
-}
 
 ## no critic (Modules::RequireExplicitInclusion)
 __PACKAGE__->meta->make_immutable();
-- 
2.4.3