File: adapt-to-module-starter-1.76

package info (click to toggle)
libmodule-starter-plugin-cgiapp-perl 0.44-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 520 kB
  • sloc: perl: 1,119; makefile: 6
file content (98 lines) | stat: -rw-r--r-- 3,333 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
From 13af756ba3800b112c7952a5a2c6bf76b4a0ecde Mon Sep 17 00:00:00 2001
From: Petr Pisar <ppisar@redhat.com>
Date: Tue, 19 Mar 2019 11:25:09 +0100
Subject: [PATCH] Adapt to changes in Module-Starter-1.76

Module::Starter::Simple changed _license_record() API. Now it returns
a Software::License object or undef. This caused
Module-Starter-Plugin-CGIApp test failures:

    Use of uninitialized value in string eq at /builddir/build/BUILD/Module-Starter-Plugin-CGIApp-0.44/blib/lib/Module/Starter/Plugin/CGIApp.pm line 468.
    Use of uninitialized value $license_blurb in scalar chomp at /builddir/build/BUILD/Module-Starter-Plugin-CGIApp-0.44/blib/lib/Module/Starter/Plugin/CGIApp.pm line 488.
    [...]
    #   Failed test 'different files'
    #   at t/common.pm line 114.
    #          got: '4'
    #     expected: '0'

This patch adapts to the chanegs and increaes a dependency on Module::Starter
to 1.76 version.

CPAN RT#128881
---
 Build.PL                            | 2 +-
 META.json                           | 2 +-
 META.yml                            | 2 +-
 lib/Module/Starter/Plugin/CGIApp.pm | 6 +++---
 4 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/Build.PL b/Build.PL
index f13c4bf..1eee1ee 100644
--- a/Build.PL
+++ b/Build.PL
@@ -26,7 +26,7 @@ my $builder = Module::Build->new(
     requires            => {
         'perl'                  => 5.008,
         'File::ShareDir'        => 0,
-        'Module::Starter'       => 1.70,
+        'Module::Starter'       => 1.76,
         'HTML::Template'        => 0,
     },
     meta_merge => {
diff --git a/META.json b/META.json
index d348950..4705665 100644
--- a/META.json
+++ b/META.json
@@ -32,7 +32,7 @@
          "requires" : {
             "File::ShareDir" : "1.00",
             "HTML::Template" : "0",
-            "Module::Starter" : "1.7",
+            "Module::Starter" : "1.76",
             "perl" : "5.008"
          }
       }
diff --git a/META.yml b/META.yml
index d2c4fea..626df06 100644
--- a/META.yml
+++ b/META.yml
@@ -24,7 +24,7 @@ provides:
 requires:
   File::ShareDir: '1.00'
   HTML::Template: '0'
-  Module::Starter: '1.7'
+  Module::Starter: '1.76'
   perl: '5.008'
 resources:
   homepage: http://jaldhar.github.com/Module-Starter-Plugin-CGIApp/
diff --git a/lib/Module/Starter/Plugin/CGIApp.pm b/lib/Module/Starter/Plugin/CGIApp.pm
index 29a102c..8b1a9fc 100644
--- a/lib/Module/Starter/Plugin/CGIApp.pm
+++ b/lib/Module/Starter/Plugin/CGIApp.pm
@@ -28,7 +28,7 @@ use English qw( -no_match_vars );
 use File::Basename;
 use File::Path qw( mkpath );
 use File::Spec ();
-use Module::Starter::BuilderSet;
+use Module::Starter::BuilderSet 1.76;
 use HTML::Template;
 
 =head1 VERSION
@@ -465,7 +465,7 @@ sub _license_blurb {
     my $license_record = $self->_license_record();
 
     if ( defined $license_record ) {
-        if ( $license_record->{license} eq 'perl' ) {
+        if ( $license_record->meta_name eq 'perl' ) {
             $license_blurb = <<'EOT';
 This distribution is free software; you can redistribute it and/or modify it
 under the terms of either:
@@ -477,7 +477,7 @@ b) the Artistic License version 1.0 or a later version.
 EOT
         }
         else {
-            $license_blurb = $license_record->{blurb};
+            $license_blurb = $license_record->notice;
         }
     }
     else {