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
=== modified file 'bin/shutter'
--- bin/shutter 2018-09-10 20:09:32 +0000
+++ bin/shutter 2019-06-07 23:21:58 +0000
@@ -57,7 +57,7 @@
5757
58#File operations58#File operations
59use File::Copy qw/ cp mv /;59use File::Copy qw/ cp mv /;
60use File::Glob qw/ glob /;60use File::Glob qw/ bsd_glob /;
61use File::Basename qw/ fileparse dirname basename /;61use File::Basename qw/ fileparse dirname basename /;
62use File::Temp qw/ tempfile tempdir /;62use File::Temp qw/ tempfile tempdir /;
63use File::Spec;63use File::Spec;
@@ -968,7 +968,7 @@
968 my $combobox_settings_profiles = Gtk2::ComboBox->new_text;968 my $combobox_settings_profiles = Gtk2::ComboBox->new_text;
969 my @current_profiles;969 my @current_profiles;
970 my $current_index = 0;970 my $current_index = 0;
971 foreach my $pfile ( sort glob("$ENV{'HOME'}/.shutter/profiles/*.xml") ) {971 foreach my $pfile ( sort bsd_glob("$ENV{'HOME'}/.shutter/profiles/*.xml") ) {
972 utf8::decode $pfile;972 utf8::decode $pfile;
973 next973 next
974 if $pfile =~ /\_accounts.xml/; #accounts file - we are looking for "real" profiles974 if $pfile =~ /\_accounts.xml/; #accounts file - we are looking for "real" profiles
@@ -8212,7 +8212,7 @@
8212 my $fb_pixbuf = $lp->load( $fb_pixbuf_path, Gtk2::IconSize->lookup('menu') );8212 my $fb_pixbuf = $lp->load( $fb_pixbuf_path, Gtk2::IconSize->lookup('menu') );
82138213
8214 foreach my $plugin_path (@plugin_paths) {8214 foreach my $plugin_path (@plugin_paths) {
8215 my @plugins = glob($plugin_path);8215 my @plugins = bsd_glob($plugin_path);
8216 foreach my $pkey (@plugins) {8216 foreach my $pkey (@plugins) {
8217 if ( -d $pkey ) {8217 if ( -d $pkey ) {
8218 my $dir_name = $pkey;8218 my $dir_name = $pkey;
@@ -8354,7 +8354,7 @@
8354 my @upload_plugin_paths = ("$shutter_root/share/shutter/resources/system/upload_plugins/upload/*");8354 my @upload_plugin_paths = ("$shutter_root/share/shutter/resources/system/upload_plugins/upload/*");
83558355
8356 foreach my $upload_plugin_path (@upload_plugin_paths) {8356 foreach my $upload_plugin_path (@upload_plugin_paths) {
8357 my @upload_plugins = glob($upload_plugin_path);8357 my @upload_plugins = bsd_glob($upload_plugin_path);
8358 foreach my $ukey (@upload_plugins) {8358 foreach my $ukey (@upload_plugins) {
83598359
8360 #Checking if file exists8360 #Checking if file exists
@@ -9437,7 +9437,7 @@
94379437
9438 #delete all files in this folder9438 #delete all files in this folder
9439 #except the ones that are in the current session9439 #except the ones that are in the current session
9440 my @unsaved_files = glob( $sdir->get_cache_dir . "/*" );9440 my @unsaved_files = bsd_glob( $sdir->get_cache_dir . "/*" );
9441 foreach my $unsaved_file (@unsaved_files) {9441 foreach my $unsaved_file (@unsaved_files) {
9442 utf8::decode $unsaved_file;9442 utf8::decode $unsaved_file;
9443 print $unsaved_file, " checking \n" if $sc->get_debug;9443 print $unsaved_file, " checking \n" if $sc->get_debug;
94449444
=== modified file 'share/shutter/resources/modules/Shutter/Draw/DrawingTool.pm'
--- share/shutter/resources/modules/Shutter/Draw/DrawingTool.pm 2014-08-09 11:58:22 +0000
+++ share/shutter/resources/modules/Shutter/Draw/DrawingTool.pm 2019-06-07 23:21:58 +0000
@@ -35,7 +35,7 @@
35use Exporter;35use Exporter;
36use Goo::Canvas;36use Goo::Canvas;
37use File::Basename qw/ fileparse dirname basename /;37use File::Basename qw/ fileparse dirname basename /;
38use File::Glob qw/ glob /;38use File::Glob qw/ bsd_glob /;
39use File::Temp qw/ tempfile tempdir /;39use File::Temp qw/ tempfile tempdir /;
40use Data::Dumper;40use Data::Dumper;
4141
@@ -221,7 +221,7 @@
221 #221 #
222 #cursors borrowed from inkscape222 #cursors borrowed from inkscape
223 #http://www.inkscape.org223 #http://www.inkscape.org
224 my @cursors = glob( $self->{_dicons} . "/cursor/*" );224 my @cursors = bsd_glob( $self->{_dicons} . "/cursor/*" );
225 foreach my $cursor_path (@cursors) {225 foreach my $cursor_path (@cursors) {
226 my ( $cname, $folder, $type ) = fileparse( $cursor_path, qr/\.[^.]*/ );226 my ( $cname, $folder, $type ) = fileparse( $cursor_path, qr/\.[^.]*/ );
227 $self->{_cursors}{$cname} = Gtk2::Gdk::Pixbuf->new_from_file($cursor_path);227 $self->{_cursors}{$cname} = Gtk2::Gdk::Pixbuf->new_from_file($cursor_path);
@@ -6567,7 +6567,7 @@
6567 my $fd = TRUE;6567 my $fd = TRUE;
6568 my $ff = FALSE;6568 my $ff = FALSE;
65696569
6570 my @objects = glob("$dobjects/*");6570 my @objects = bsd_glob("$dobjects/*");
6571 foreach my $name ( sort { -d $a <=> -d $b } @objects ) {6571 foreach my $name ( sort { -d $a <=> -d $b } @objects ) {
65726572
6573 #parse filename6573 #parse filename

Subscribers

People subscribed via source and target branches

to status/vote changes: