moose/moose — pull request #32 by matthof (2013-08-27 17:27:27+00:00)
Title: support debugger in HasMethods::add_method

When using the perl debugger, it is useful to keep track of the correct
file name and line numbers per method. Package::Stash allows for this
in add_symbol (wrapped by MOP method add_package_symbol), but requires
that additional arguments are passed in to track this information. This
changelist modifies add_method so that, if the debugger is enabled, we
pass the additional parameters into add_package_symbol so as not to
clobber the debugger info in %DB::sub.

Also includes tests which will fail prior to this change (because the %DB::sub values are clobbered during add_method) and succeed with the change.