catalyst-cloud / RT-Extension-ElapsedBusinessTime

Calculate elapsed business time for tickets
2 stars 0 forks source link

Unable to locate Set/Object.pm #2

Open garnser opened 4 years ago

garnser commented 4 years ago

Hi,

As I'm trying out this extensions there seams to be a path issue as the extension is enabled.

Any pointers would be appreciated. Please note that this only occurs when enabling ElapsedBusinessTime, the other extensions are working fine. RT version 4.4.4.

<10>1 2020-08-04T12:23:54.339653+02:00 rb-rt01 RT - - - [32416] Can't locate Set/Object.pm in @INC (@INC contains: /opt/rt4/sbin/../local/lib /opt/rt4/local/plugins/RT-Authen-Token/lib /opt/rt4/local/plugins/RT-Extension-A\
utomaticAssignment/lib /opt/rt4/local/plugins/RT-Extension-CustomFieldsOnUpdate/lib /opt/rt4/local/plugins/RT-Extension-ElapsedBusinessTime/lib /opt/rt4/local/plugins/RT-Extension-ExtractCustomFieldValues/lib /opt/rt4/loca\
l/plugins/RT-Extension-MandatoryOnTransition/lib /opt/rt4/local/plugins/RT-Extension-REST2/lib /opt/rt4/local/plugins/RT-Extension-SearchResult/lib /opt/rt4/local/plugins/RT-Extension-TicketLocking/lib /opt/rt4/sbin/../lib\
 /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at /opt/rt4/local/plugins/RT-Extension-ElapsedBusinessTime/lib/RT/Extension/Elap\
sedBusinessTime.pm line 146.#012BEGIN failed--compilation aborted at /opt/rt4/local/plugins/RT-Extension-ElapsedBusinessTime/lib/RT/Extension/ElapsedBusinessTime.pm line 146.#012Compilation failed in require at /opt/rt4/sb\
in/../lib/RT.pm line 775.
puck commented 4 years ago

Hey,

You'll need to install Set::Object. On CPAN it is here: https://metacpan.org/pod/Set::Object

Cheers, Andrew

garnser commented 4 years ago

makes sense 👍

Please consider adding in the docs that Set::Object and Date::Holidays are required.

Thanks!

puck commented 4 years ago

The requirement of Set::Object is defined in META.yml, if you used Makefile.PL it should have complained that Set::Object wasn't installed. Did this not happen?

Date::Holidays isn't required, and in the README it states under the 'country' configuration option: "A country for which there is a Date::Holidays module which describes the holidays for that country." Would you expect a more explicit comment about requiring Date::Holidays to be installed if a country is set?

garnser commented 4 years ago

Hi,

Makefile.PL was used without any warnings.

As for Date::Holidays my config is as follows for now: Country => undef, Region => undef,

However when restarting RT I'm presented with the same error as for Set::Object, which was resolved by installing Date::Holidays

`Can't locate Date/Holidays.pm in @INC (@INC contains: /opt/rt4/bin/../local/lib /opt/rt4/local/plugins/RT-Authen- Token/lib /opt/rt4/local/plugins/RT-Extension-AutomaticAssignment/lib /opt/rt4/local/plugins/RT-Extension-CustomFieldsOnUpdate/lib /opt/rt4/local/plugins/RT-Extension-ElapsedBusinessTim e/lib /opt/rt4/local/plugins/RT-Extension-ExtractCustomFieldValues/lib /opt/rt4/local/plugins/RT-Extension-MandatoryOnTransition/lib /opt/rt4/local/plugins/RT-Extension-REST2/lib /opt/r t4/local/plugins/RT-Extension-SearchResult/lib /opt/rt4/local/plugins/RT-Extension-TicketLocking/lib /opt/rt4/bin/../lib /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/v endor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at /opt/rt4/local/plugins/RT-Extension-ElapsedBusinessTime/lib/RT/Extension/ElapsedBusinessTime.pm line 168.

012BEGIN failed--compilation aborted at /opt/rt4/local/plugins/RT-Extension-ElapsedBusinessTime/lib/RT/Extension/ElapsedBusinessTime.pm line 168.#012Compilation failed in require at /o

pt/rt4/bin/../lib/RT.pm line 775.`

puck commented 4 years ago

I've just released version 0.05 which now correctly handles the case where Date::Holidays isn't installed. Thank you!

With a missing Set::Object, when I run "perl Makefile.PL" I get:

perl Makefile.PL Cannot determine perl version info from lib/RT/Extension/ElapsedBusinessTime.pm Using RT configuration from /usr/share/request-tracker4/lib/RT.pm: html => /usr/local/share/request-tracker4/plugins/RT-Extension-ElapsedBusinessTime/html lib => /usr/local/share/request-tracker4/plugins/RT-Extension-ElapsedBusinessTime/lib Warning: prerequisite Set::Object 0 not found. Generating a Unix-style Makefile Writing Makefile for RT::Extension::ElapsedBusinessTime Writing MYMETA.yml and MYMETA.json

In particular that Warning line. Did you get that?

Cheers, Andrew