summaryrefslogtreecommitdiffstats
path: root/extensions/Example
diff options
context:
space:
mode:
Diffstat (limited to 'extensions/Example')
-rw-r--r--extensions/Example/API/1_0/Resource/Example.pm2
-rw-r--r--extensions/Example/Config.pm2
-rw-r--r--extensions/Example/Extension.pm10
-rw-r--r--extensions/Example/lib/Auth/Login.pm2
-rw-r--r--extensions/Example/lib/Auth/Verify.pm2
-rw-r--r--extensions/Example/lib/Config.pm2
-rw-r--r--extensions/Example/lib/Migrate/ImportBugs.pm6
-rw-r--r--extensions/Example/lib/Util.pm2
-rw-r--r--extensions/Example/lib/WebService.pm2
9 files changed, 14 insertions, 16 deletions
diff --git a/extensions/Example/API/1_0/Resource/Example.pm b/extensions/Example/API/1_0/Resource/Example.pm
index c4c5f9a32..38000fbdb 100644
--- a/extensions/Example/API/1_0/Resource/Example.pm
+++ b/extensions/Example/API/1_0/Resource/Example.pm
@@ -7,7 +7,7 @@
package Bugzilla::API::1_0::Resource::Example;
-use 5.10.1;
+use 5.14.0;
use strict;
use warnings;
use parent qw(Bugzilla::API::1_0::Resource);
diff --git a/extensions/Example/Config.pm b/extensions/Example/Config.pm
index 16708e3f8..02ed01e77 100644
--- a/extensions/Example/Config.pm
+++ b/extensions/Example/Config.pm
@@ -7,7 +7,7 @@
package Bugzilla::Extension::Example;
-use 5.10.1;
+use 5.14.0;
use strict;
use warnings;
diff --git a/extensions/Example/Extension.pm b/extensions/Example/Extension.pm
index 40ee9c2d1..ef27200ac 100644
--- a/extensions/Example/Extension.pm
+++ b/extensions/Example/Extension.pm
@@ -7,7 +7,7 @@
package Bugzilla::Extension::Example;
-use 5.10.1;
+use 5.14.0;
use strict;
use warnings;
@@ -479,13 +479,7 @@ sub error_catch {
my $new_error_msg = "Ah ah, you tried to access $page_id? Good try!";
$new_error_msg = html_quote($new_error_msg);
# There are better tools to parse an HTML page, but it's just an example.
- # Since Perl 5.16, we can no longer write "class" inside look-behind
- # assertions, because "ss" is also seen as the german ß character, which
- # makes Perl 5.16 complain. The right fix is to use the /aa modifier,
- # but it's only understood since Perl 5.14. So the workaround is to write
- # "clas[s]" instead of "class". Stupid and ugly hack, but it works with
- # all Perl versions.
- $$page =~ s/(?<=<td id="error_msg" clas[s]="throw_error">).*(?=<\/td>)/$new_error_msg/si;
+ $$page =~ s/<div id="error_msg" class="throw_error">\K(.*)/$new_error_msg<br>$1/siaa;
}
sub flag_end_of_update {
diff --git a/extensions/Example/lib/Auth/Login.pm b/extensions/Example/lib/Auth/Login.pm
index 15c58a881..77a113722 100644
--- a/extensions/Example/lib/Auth/Login.pm
+++ b/extensions/Example/lib/Auth/Login.pm
@@ -7,7 +7,7 @@
package Bugzilla::Extension::Example::Auth::Login;
-use 5.10.1;
+use 5.14.0;
use strict;
use warnings;
diff --git a/extensions/Example/lib/Auth/Verify.pm b/extensions/Example/lib/Auth/Verify.pm
index 49fd9fbb7..8cda4a9e8 100644
--- a/extensions/Example/lib/Auth/Verify.pm
+++ b/extensions/Example/lib/Auth/Verify.pm
@@ -7,7 +7,7 @@
package Bugzilla::Extension::Example::Auth::Verify;
-use 5.10.1;
+use 5.14.0;
use strict;
use warnings;
diff --git a/extensions/Example/lib/Config.pm b/extensions/Example/lib/Config.pm
index fac0046af..311ea4a6a 100644
--- a/extensions/Example/lib/Config.pm
+++ b/extensions/Example/lib/Config.pm
@@ -7,7 +7,7 @@
package Bugzilla::Extension::Example::Config;
-use 5.10.1;
+use 5.14.0;
use strict;
use warnings;
diff --git a/extensions/Example/lib/Migrate/ImportBugs.pm b/extensions/Example/lib/Migrate/ImportBugs.pm
index 42a393c73..3160c91a8 100644
--- a/extensions/Example/lib/Migrate/ImportBugs.pm
+++ b/extensions/Example/lib/Migrate/ImportBugs.pm
@@ -18,8 +18,12 @@ implementation see L<Bugzilla::Migrate::Gnats>.
=cut
package Bugzilla::Extension::Example::Migrate::ImportBugs;
+
+use 5.14.0
use strict;
-use base qw(Bugzilla::Migrate);
+use warnings;
+
+use parent qw(Bugzilla::Migrate);
use Bugzilla::Constants;
use Bugzilla::Install::Util qw(indicate_progress);
diff --git a/extensions/Example/lib/Util.pm b/extensions/Example/lib/Util.pm
index ccc349c9c..88a9a5a84 100644
--- a/extensions/Example/lib/Util.pm
+++ b/extensions/Example/lib/Util.pm
@@ -7,7 +7,7 @@
package Bugzilla::Extension::Example::Util;
-use 5.10.1;
+use 5.14.0;
use strict;
use warnings;
diff --git a/extensions/Example/lib/WebService.pm b/extensions/Example/lib/WebService.pm
index d8a96b5f5..4dc7dd2e5 100644
--- a/extensions/Example/lib/WebService.pm
+++ b/extensions/Example/lib/WebService.pm
@@ -7,7 +7,7 @@
package Bugzilla::Extension::Example::WebService;
-use 5.10.1;
+use 5.14.0;
use strict;
use warnings;
use parent qw(Bugzilla::WebService);