-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wrong distname error not handled graciously #6
Comments
Its possible that for some reason its dist/not a dist heuristic is failing. Most likely causes for that failing are Also, can you post output given with export FILE_SHAREDIR_PROJECTDISTDIR_DEBUG=1 ? Also, which version are you using thats exhibiting this, because I can't see how # https://metacpan.org/source/KENTNL/File-ShareDir-ProjectDistDir-0.4.4/lib/File/ShareDir/ProjectDistDir.pm#L221
return $string_method if not $pathclass; would cause that. Additionally, if you get bored, theres a 0.5 release that tries to change the internals to work in terms of the (new) https://metacpan.org/release/KENTNL/File-ShareDir-ProjectDistDir-0.5.0-TRIAL Though this is still very experimental. |
sorry about the spaces in the middle of some of the lines, those were added by me making this code formated (really need to readd my prepend spaces function to my shell) |
On GH Markdown, you can use ``` as a code markup, so you don't need to add indentation to make it format. ie:
--> blah use Class::Name qw(foo);
my $foo = blah(); |
oh well that's cool, also boo markdown varieties, I don't think it particularly hurts readability, there are no spaces in the path, ever. I would say though that the problem is it's looking at:
instead of
|
This line is indicative:
I'm trying to remember how this part of the system works on Either way, its hitting
It should still be able to work, but I just need a better look at it. |
Yeah, exactly, however, the place your error comes from appears to be this code if I'm not wrong? if ( not $distname ) {
my $string_method = \&File::ShareDir::dist_file;
return $string_method if not $pathclass;
return sub { Path::Class::File->new( $string_method->(@_) ) };
} So here, its in |
Sorry if I'm debugging via a long tube, stuck on windows away from my dev space for a little while, can't reboot just yet, so trying to make what progress I can in the interim. You could try -use File::ShareDir::ProjectDistDir ':all', defaults => { pathclass => 1 };
+use File::ShareDir qw(:all); And although like that it won't work under |
It appears to still be a problem with |
I have found the source of my issue, it's a PEBCAK, this dist got renamed when I split it from the B:OP module. I still had the old dist name coded in... (I think this goes back to me wanting to be able to use |
No no, don't worry, its still a legitimate concern for me, it means I need better error handling somewhere still, even if its not my module at fault, I need better ways to easily diagnose common fault types. Now I know there's a bad error handling when a After all, encapsulation rules dictate that even if a dependency of an encapuslated component is to blame, people using the API shouldn't be worrying about the implementation details, they should only worry about the interface the API provides. So an encapsulation should either aim to solve a problem in a dependency, or push for fixes in the dependency. |
Failed to find shared file 'svc.paperlesstrans.wsdl' for dist 'Business-OnlinePayment-PaperlessTrans' at /home/xenoterracide/perl5/perlbrew/perls/perl-5.18.0/lib/site_perl/5.18.0/File/ShareDir/ProjectDistDir.pm line 211.
Not sure why, this only happens when run using
make test
normalprove -lvr
works fine. Didn't have this problem previously.https://github.com/xenoterracide/Business-PaperlessTrans
sharedir is loaded and used in Business::PaperlessTrans::Client
(note: tests under which it occurs do not run without credentials, could probably write one for you, also calling the attributes directly would do it )
The text was updated successfully, but these errors were encountered: