According to MetaCPAN*, TryCatch has a dependency on Moose: https://metacpan.org/pod/TryCatch It's in the META.yml and Makefile: https://metacpan.org/source/ASH/TryCatch-1.003002/META.yml https://metacpan.org/source/ASH/TryCatch-1.003002/Makefile.PL So you're going to have a hard time building TryCatch without Moose, even if you build a custom Debian package, I imagine. As for the source code (https://metacpan.org/source/ASH/TryCatch-1.003002/lib/TryCatch.pm), I see Moose::Util::TypeConstraints, which uses a few Moose::* packages which Zeno has pointed out. It also requires Class::MOP, which appears to load some Moose XS with the XSLoader (https://metacpan.org/source/Class::MOP#L32). And actually... if you look at Moose::Exporter... that's part of the Moose package: https://metacpan.org/source/ETHER/Moose-2.1805, so you need to install "Moose" if you're going to get Moose::Exporter and Moose::Deprecated. If you see the TODO for TryCatch, you'll see it's on the TODO list to split out the Moose dependency: https://metacpan.org/pod/TryCatch#TODO *I always use MetaCPAN these days when I'm tracking Perl dependencies since it does a lot of autodiscovery and it's just a nicer interface than CPAN. David Cook Systems Librarian Prosentient Systems 72/330 Wattle St Ultimo, NSW 2007 Australia Office: 02 9212 0899 Direct: 02 8005 0595
-----Original Message----- From: koha-devel-bounces@lists.koha-community.org [mailto:koha-devel- bounces@lists.koha-community.org] On Behalf Of Tajoli Zeno Sent: Tuesday, 13 September 2016 9:42 PM To: koha-devel <koha-devel@lists.koha-community.org> Subject: Re: [Koha-devel] Coding patterns discussion
Hi,
Il 13/09/2016 12:19, Kyle Hall ha scritto:
TryCatch requires Moose while Try::Tiny is lightweight, but I guess we're going down the Moose rabbit hole anyways these days? Doesn't TryCatch just do try/catch/catch instead of if/elsif/elsif?
I had thought TryCatch's use of Moose would be a deal-breaker ( at least until Koha is officially plack-only ), but after inspecting the code, I don't believe it actually uses Moose. It does use packages in the Moose namespace, but it doesn't appear to use Moose itself, though it's possible I didn't go far enough down the rabbit hole.
reading the code of TryCatch I see that it use: Moose::Util::TypeConstraints that it use: Moose::Exporter; Moose::Deprecated that they use: Moose::Util::MetaRole Moose::Util Try::Tiny
So in fact: -- Installing TryCatch we install also Try::Tiny -- We need to create an ad hoc debian package, the debian standard package uses Moose. -- Try::Tiny is in this package: https://packages.debian.org/jessie/libtry-tiny-perl, version 0.22 it is enough ?
Bye Zeno Tajoli
-- Zeno Tajoli /SVILUPPO PRODOTTI CINECA/ - Automazione Biblioteche Email: z.tajoli@cineca.it Fax: 051/6132198 *CINECA* Consorzio Interuniversitario - Sede operativa di Segrate (MI) _______________________________________________ Koha-devel mailing list Koha-devel@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/