You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I tried to use Bolts in a simple script and found a case where builder is apparently called twice.
use strict;
use warnings;
package Bar {
use Bolts;
artifact foobar => (
builder => sub {
warn "BUILDER CALLED with ", join( ' ', map {"$_"} @_), "\n";
return 'built';
}
);
}
package Foo {
use Bolts;
has bar => ( is => 'ro', required => 1 );
}
my $foo = Foo->new(bar=>Bar->new);
warn $foo->acquire('bar', 'foobar');
I tried to trace the code, and the following lines in Bolts::Role::RootLocator::acquire seems quite suspicious to me (missing return inside condition?):
# If the $item is a locator, pass control of the process to that
if (@path && $item->$_can('does') && $item->$_does('Bolts::Role::Locator')) {
$item->acquire(@path, $options);
}
The text was updated successfully, but these errors were encountered:
I tried to use Bolts in a simple script and found a case where builder is apparently called twice.
I tried to trace the code, and the following lines in
Bolts::Role::RootLocator::acquire
seems quite suspicious to me (missing return inside condition?):The text was updated successfully, but these errors were encountered: