Module::Runtime->require_module returns 1 on success if module is already loaded, which breaks in this usecase:
matt@mercury:~$ perl -MCrypt::XkcdPassword -Mfeature="say" -e 'say Crypt::XkcdPassword->make_password for 1..2'
k amy jennings taken
coercion for "words" failed: Can't locate object method "new" via package "1" (perhaps you forgot to load "1"?) at /home/matt/perl5/lib/perl5/Crypt/XkcdPassword.pm line 31, line 9998.
Module::Runtime->use_module always returns the loaded module name for expected constructor usage.
Module::Runtime->require_module returns 1 on success if module is already loaded, which breaks in this usecase:
matt@mercury:~$ perl -MCrypt::XkcdPassword -Mfeature="say" -e 'say Crypt::XkcdPassword->make_password for 1..2' k amy jennings taken coercion for "words" failed: Can't locate object method "new" via package "1" (perhaps you forgot to load "1"?) at /home/matt/perl5/lib/perl5/Crypt/XkcdPassword.pm line 31, line 9998.
Module::Runtime->use_module always returns the loaded module name for expected constructor usage.