Skip to content

Add proper error handling if Path::Class is missing - #833

Merged
Photon89 merged 1 commit into
masterfrom
check-path-class
Aug 22, 2026
Merged

Add proper error handling if Path::Class is missing#833
Photon89 merged 1 commit into
masterfrom
check-path-class

Conversation

@Photon89

@Photon89 Photon89 commented Aug 19, 2026

Copy link
Copy Markdown
Member

Path::Class is an optional dependency, which is only required for the Imgur.pm upload plugin. So far Shutter didn't handle it properly and you got non-fatal errors on launch if the dependency was not met:

INFO: new upload-plugin information detected - /home/photon/Downloads/shutter-master/share/shutter/resources/system/upload_plugins/upload/Imgur
Can't locate Path/Class.pm in @INC (you may need to install the Path::Class module) (@INC entries checked: /home/photon/Downloads/shutter-master/share/shutter/resources/modules /usr/lib/perl5/5.42/site_perl /usr/share/perl5/site_perl /usr/lib/perl5/5.42/vendor_perl /usr/share/perl5/vendor_perl /usr/lib/perl5/5.42/core_perl /usr/share/perl5/core_perl) at /home/photon/Downloads/shutter-master/share/shutter/resources/system/upload_plugins/upload/Imgur.pm line 77.
BEGIN failed--compilation aborted at /home/photon/Downloads/shutter-master/share/shutter/resources/system/upload_plugins/upload/Imgur.pm line 77.

ERROR: upload-plugin exists but does not work properly - /home/photon/Downloads/shutter-master/share/shutter/resources/system/upload_plugins/upload/Imgur

Also, the update-plugin dialog popped up for some milliseconds at each launch.

With this PR the dialog won't appear each launch and you get a kind of clean warning similar to other warnings for unmet optional dependencies:

WARNING: Path::Class is missing --> uploading to Imgur will be disabled!

 at ./shutter_new line 9410.
        Shutter::App::fct_init_depend() called at ./shutter_new line 201

I couldn't figure out how to get rid of the last two lines but this happens to all other warnings as well, so not related to this PR.

@Photon89

Copy link
Copy Markdown
Member Author

For some reason the CI fails at the "install deps" step, it won't complete after 30 mins. Not sure if this is a temporary or a permanent issue and whether we can do something about it.

@Photon89
Photon89 merged commit 11c86fc into master Aug 22, 2026
1 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants