At 7:03 PM -0500 9/30/07, John E. Malmberg wrote: >Craig A. Berry wrote: >>At 1:28 PM -0500 9/29/07, John E. Malmberg wrote: >> >>> >>> [-.lib.Module.Build.t]xs.t >>> >>>Can't locate object method "blib >>>" via package "Module::Build" at >>>/PROJECT_ROOT/PERL-BLEAD/lib/Module/Build/Base. >>>pm line 2210. >>># Looks like you planned 22 tests but only ran 15. >>> >>>This works find when run in debug, so I am still trying to figure >>>out what is wrong. The extra line break in the error message may be a clue. >> >>I can confirm that calling $self->blib works in the debugger but not >>outside of it. And I finally figured out that the way $self->foo >>gets translated internally into $self->{properties}{foo} is that >>Module::Build::Base::add_property creates an anonymous subroutine on >>the fly for each property as the property is created. Then it >>deanonymizes it by dong a typeglob assignment like so: >> >> *{"$class\::$property"} = sub { >> my $self = shift; >> $self->{properties}{$property} = shift if @_; >> return $self->{properties}{$property}; >> } >> >>So most likely we are clobbering the typeglob somehow, but heck if I know how. > >Most of the other Module::Build tests call $self->blib and it works on those >cases. > >So this is something unique to the xs.t test.
True. >Since the debugger is messing things up, my next plan of attack is to start >adding print STDERR statements. Or, more precisely, the debugger prevents things from getting messed up that without it do get messed up. I've narrowed it down slightly in that simply commenting out $mb->dispatch('realclean') as below makes the method lookup problem a few lines later go away. But restoring that line and putting C<print $mb->blib> before and after it reveals nothing interesting (I get 'blib' without the newline both times), and where the problem occurs it's a completely different Module::Build object anyway since Module::Build->new() has been called again. --- xs.t;-0 Sat Sep 8 11:42:08 2007 +++ xs.t Sun Sep 30 19:51:43 2007 @@ -93,7 +93,7 @@ SKIP: { $mb->{config}->pop('ld'); } -eval {$mb->dispatch('realclean')}; +####eval {$mb->dispatch('realclean')}; is $@, ''; # Make sure blib/ is gone after 'realclean' [end] -- ________________________________________ Craig A. Berry mailto:[EMAIL PROTECTED] "... getting out of a sonnet is much more difficult than getting in." Brad Leithauser