Merge lp:~invidian/shutter/perl-5.30 into lp:shutter

Proposed by Mateusz Gozdek
Status: Merged
Merged at revision: 1304
Proposed branch: lp:~invidian/shutter/perl-5.30
Merge into: lp:shutter
Diff against target: 79 lines (+8/-8)
2 files modified
bin/shutter (+5/-5)
share/shutter/resources/modules/Shutter/Draw/DrawingTool.pm (+3/-3)
To merge this branch: bzr merge lp:~invidian/shutter/perl-5.30
Reviewer Review Type Date Requested Status
Shutter Team Pending
Review via email: mp+368569@code.launchpad.net
To post a comment you must log in.
lp:~invidian/shutter/perl-5.30 updated
1304. By Mateusz Gozdek

Switch from glob to bsd_glob

glob has been deperecated from Perl from a long time and has been removed in
version 5.30.

This commit simply migrates from old 'glob' to new 'bsd_glob', which provides
the same functionality.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'bin/shutter'
2--- bin/shutter 2018-09-10 20:09:32 +0000
3+++ bin/shutter 2019-06-07 23:21:58 +0000
4@@ -57,7 +57,7 @@
5
6 #File operations
7 use File::Copy qw/ cp mv /;
8-use File::Glob qw/ glob /;
9+use File::Glob qw/ bsd_glob /;
10 use File::Basename qw/ fileparse dirname basename /;
11 use File::Temp qw/ tempfile tempdir /;
12 use File::Spec;
13@@ -968,7 +968,7 @@
14 my $combobox_settings_profiles = Gtk2::ComboBox->new_text;
15 my @current_profiles;
16 my $current_index = 0;
17- foreach my $pfile ( sort glob("$ENV{'HOME'}/.shutter/profiles/*.xml") ) {
18+ foreach my $pfile ( sort bsd_glob("$ENV{'HOME'}/.shutter/profiles/*.xml") ) {
19 utf8::decode $pfile;
20 next
21 if $pfile =~ /\_accounts.xml/; #accounts file - we are looking for "real" profiles
22@@ -8212,7 +8212,7 @@
23 my $fb_pixbuf = $lp->load( $fb_pixbuf_path, Gtk2::IconSize->lookup('menu') );
24
25 foreach my $plugin_path (@plugin_paths) {
26- my @plugins = glob($plugin_path);
27+ my @plugins = bsd_glob($plugin_path);
28 foreach my $pkey (@plugins) {
29 if ( -d $pkey ) {
30 my $dir_name = $pkey;
31@@ -8354,7 +8354,7 @@
32 my @upload_plugin_paths = ("$shutter_root/share/shutter/resources/system/upload_plugins/upload/*");
33
34 foreach my $upload_plugin_path (@upload_plugin_paths) {
35- my @upload_plugins = glob($upload_plugin_path);
36+ my @upload_plugins = bsd_glob($upload_plugin_path);
37 foreach my $ukey (@upload_plugins) {
38
39 #Checking if file exists
40@@ -9437,7 +9437,7 @@
41
42 #delete all files in this folder
43 #except the ones that are in the current session
44- my @unsaved_files = glob( $sdir->get_cache_dir . "/*" );
45+ my @unsaved_files = bsd_glob( $sdir->get_cache_dir . "/*" );
46 foreach my $unsaved_file (@unsaved_files) {
47 utf8::decode $unsaved_file;
48 print $unsaved_file, " checking \n" if $sc->get_debug;
49
50=== modified file 'share/shutter/resources/modules/Shutter/Draw/DrawingTool.pm'
51--- share/shutter/resources/modules/Shutter/Draw/DrawingTool.pm 2014-08-09 11:58:22 +0000
52+++ share/shutter/resources/modules/Shutter/Draw/DrawingTool.pm 2019-06-07 23:21:58 +0000
53@@ -35,7 +35,7 @@
54 use Exporter;
55 use Goo::Canvas;
56 use File::Basename qw/ fileparse dirname basename /;
57-use File::Glob qw/ glob /;
58+use File::Glob qw/ bsd_glob /;
59 use File::Temp qw/ tempfile tempdir /;
60 use Data::Dumper;
61
62@@ -221,7 +221,7 @@
63 #
64 #cursors borrowed from inkscape
65 #http://www.inkscape.org
66- my @cursors = glob( $self->{_dicons} . "/cursor/*" );
67+ my @cursors = bsd_glob( $self->{_dicons} . "/cursor/*" );
68 foreach my $cursor_path (@cursors) {
69 my ( $cname, $folder, $type ) = fileparse( $cursor_path, qr/\.[^.]*/ );
70 $self->{_cursors}{$cname} = Gtk2::Gdk::Pixbuf->new_from_file($cursor_path);
71@@ -6567,7 +6567,7 @@
72 my $fd = TRUE;
73 my $ff = FALSE;
74
75- my @objects = glob("$dobjects/*");
76+ my @objects = bsd_glob("$dobjects/*");
77 foreach my $name ( sort { -d $a <=> -d $b } @objects ) {
78
79 #parse filename

Subscribers

People subscribed via source and target branches

to status/vote changes: