[dancer-users] Moving from Centos to Ubuntu

Zahir Lalani ZahirLalani at oliver.agency
Thu Jun 29 18:42:18 BST 2023


Hello all

I hope someone can help. We are finally making the move from Centos to Ubuntu and are finding we are needing to make quite a few adjustments to the code base due to the version of perl being a lot newer.

However, one issue I cannot seem to resolve is the following

Test File:
#!/usr/bin/perl

use lib '.';
use Dancer2 appname => 'archive_assets';
use strict;
use warnings;
use Data::Dumper;
use TryCatch;


try {
        say "1234";
} catch {
        print "Something went wrong \n";
}

Perl -c output

[archive_assets:1475837] core @2023-06-29 17:29:54> Built config from files: /var/www/OMG/tools/archive_assets/environments/development.yml in (eval 274) l. 910
Couldn't find declarator 'try' at /usr/lib/x86_64-linux-gnu/perl5/5.34/Devel/Declare/Context/Simple.pm line 47.
        Devel::Declare::Context::Simple::skip_declarator(TryCatch=HASH(0x55fcf9da2b50)) called at /usr/lib/x86_64-linux-gnu/perl5/5.34/TryCatch.pm line 83
        TryCatch::_parse_try("TryCatch", "main", "try", 0) called at /usr/lib/x86_64-linux-gnu/perl5/5.34/TryCatch.pm line 44
        TryCatch::__ANON__("try", 0) called at /usr/lib/x86_64-linux-gnu/perl5/5.34/Devel/Declare.pm line 277
        Devel::Declare::linestr_callback("const", "try", 0) called at z.pl line 11

I have tried hunting for an answer and it seems its an issue with Devel::Declare?

Any ideas?

Z
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.preshweb.co.uk/pipermail/dancer-users/attachments/20230629/e3bfb8e2/attachment.htm>


More information about the dancer-users mailing list