From 2ca9211e69918e89c21398d62cb7ad87fa78a91ef17fba056f2dab5943a3203d Mon Sep 17 00:00:00 2001 From: Christian Wittmer Date: Wed, 24 Aug 2011 21:43:57 +0000 Subject: [PATCH] fix deps OBS-URL: https://build.opensuse.org/package/show/devel:languages:perl/perl-CGI-Application-Plugin-Forward?expand=0&rev=2 --- perl-CGI-Application-Plugin-Forward.changes | 8 +++ perl-CGI-Application-Plugin-Forward.spec | 78 +++------------------ 2 files changed, 19 insertions(+), 67 deletions(-) diff --git a/perl-CGI-Application-Plugin-Forward.changes b/perl-CGI-Application-Plugin-Forward.changes index d9ea86a..904fb6c 100644 --- a/perl-CGI-Application-Plugin-Forward.changes +++ b/perl-CGI-Application-Plugin-Forward.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Wed Aug 24 21:43:02 UTC 2011 - chris@computersalat.de + +- fix deps + * suse > 1140: perl(Class::ISA) +- remove Recommends +- cleanup desc + ------------------------------------------------------------------- Thu Apr 21 04:58:20 UTC 2011 - coolo@opensuse.org diff --git a/perl-CGI-Application-Plugin-Forward.spec b/perl-CGI-Application-Plugin-Forward.spec index ac6cf90..1229780 100644 --- a/perl-CGI-Application-Plugin-Forward.spec +++ b/perl-CGI-Application-Plugin-Forward.spec @@ -1,7 +1,7 @@ # -# spec file for package perl-CGI-Application-Plugin-Forward (Version 1.06) +# spec file for package perl-CGI-Application-Plugin-Forward # -# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -27,14 +27,19 @@ Source: http://www.cpan.org/authors/id/M/MG/MGRAHAM/%{cpan_name}-%{versi BuildArch: noarch BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: perl -BuildRequires: perl(Module::Build) BuildRequires: perl-macros -BuildRequires: perl(CGI::Application) BuildRequires: perl(Module::Build) BuildRequires: perl(Test::More) +# perl 5.12.3: Class::ISA will be removed from the Perl core +# distribution in the next major release. +%if 0%{?suse_version} > 1140 +BuildRequires: perl(Class::ISA) +%endif +BuildRequires: perl(CGI::Application) Requires: perl(CGI::Application) -Requires: perl(Test::More) -Recommends: perl(CGI::Application::Plugin::AutoRunmode) +%if 0%{?suse_version} > 1010 +Recommends: perl(CGI::Application::Plugin::AutoRunmode) >= 0.09 +%endif %{perl_requires} %description @@ -48,67 +53,6 @@ This means that calling '$self->get_current_runmode' after calling modules that depend on the name of the current run mode such as the CGI::Application::Plugin::AnyTemplate manpage. -For example, here's how to pass control to a run mode named 'other_action' -from 'start' while updating the value of 'current_run_mode': - - sub setup { - my $self = shift; - $self->run_modes({ - start => 'start', - other_action => 'other_method', - }); - } - sub start { - my $self = shift; - return $self->forward('other_action'); - } - sub other_method { - my $self = shift; - - my $rm = $self->get_current_runmode; # 'other_action' - } - -Note that forward accepts the _name_ of the run mode (in this case -_'other_action'_), which might not be the same as the name of the method -that handles the run mode (in this case _'other_method'_) - -You can still call '$self->other_method' directly, but 'current_run_mode' -will not be updated: - - sub setup { - my $self = shift; - $self->run_modes({ - start => 'start', - other_action => 'other_method', - }); - } - sub start { - my $self = shift; - return $self->other_method; - } - sub other_method { - my $self = shift; - - my $rm = $self->get_current_runmode; # 'start' - } - -Forward will work with coderef-based runmodes as well: - - sub setup { - my $self = shift; - $self->run_modes({ - start => 'start', - anon_action => sub { - my $self = shift; - my $rm = $self->get_current_runmode; # 'anon_action' - }, - }); - } - sub start { - my $self = shift; - return $self->forward('anon_action'); - } - %prep %setup -q -n %{cpan_name}-%{version}