frioux / DBIx-Class-DeploymentHandler

https://metacpan.org/pod/DBIx::Class::DeploymentHandler
21 stars 26 forks source link

generate short package names for scripts #56

Closed andrewgregory closed 7 years ago

andrewgregory commented 7 years ago

_load_sandbox was dynamically building packages and naming them after the full path of the script file. Perl limits package names to "about 250" characters according to perldiag, which could easily be exceeded by a path.

Fixes #55

I'm not sure what DBICDH's current minimum Perl version is, but state requires at least 5.10.

frioux commented 7 years ago

For some reason I think Moose requires 5.10. If none of the deps for DBICDH are 5.10 I can replace state with an outer my.

coveralls commented 7 years ago

Coverage Status

Coverage increased (+0.3%) to 86.129% when pulling 1c52962e2bfed84d2ee16ddbfd3548774641bba3 on andrewgregory:identifier-too-long into cb197dcbe834d770222b66b6f8c28faedd293a79 on frioux:master.

frioux commented 7 years ago

Yeah looks like it failed; we'll need to change

sub foo {
   state $bar ...
}

to

my $bar = ...;
sub foo {
...
}
coveralls commented 7 years ago

Coverage Status

Coverage increased (+0.2%) to 86.062% when pulling 912c834b4a2d051c90bb75c25fb2e9d83b984926 on andrewgregory:identifier-too-long into cb197dcbe834d770222b66b6f8c28faedd293a79 on frioux:master.

frioux commented 7 years ago

Thanks; have you verified that it fixes your problem?

andrewgregory commented 7 years ago

Yes.

frioux commented 7 years ago

Merged, releasing!