Subject: | Patch to fix deprecated use of compute_all_applicable_methods |
Upon autocompletion, the CompletionDriver::Methods plugin was throwing
the warning attached in the file stacktrace.txt, due to the deprecated
use of compute_all_applicable_methods.
Running "ack 'compute'" revealed that CompletionDriver/Turtles.pm was
also using it:
brunov@dora:~/lib/Devel-REPL$ ack 'compute'
lib/Devel/REPL/Plugin/CompletionDriver/Methods.pm
61: $metaclass->compute_all_applicable_methods;
lib/Devel/REPL/Plugin/CompletionDriver/Turtles.pm
28: $self->meta->compute_all_applicable_methods
The patch attached (patch.diff) replaces this occurrences with
'get_all_methods'. It's done against revision 5883 (1.3.6).
Subject: | patch.diff |
Index: Devel-REPL/lib/Devel/REPL/Plugin/CompletionDriver/Turtles.pm
===================================================================
--- Devel-REPL/lib/Devel/REPL/Plugin/CompletionDriver/Turtles.pm (revisión: 5883)
+++ Devel-REPL/lib/Devel/REPL/Plugin/CompletionDriver/Turtles.pm (copia de trabajo)
@@ -25,7 +25,7 @@
grep { $_ =~ $filter }
map { /^expr?_command_(\w+)/ ? $1 : () }
map { $_->{name} }
- $self->meta->compute_all_applicable_methods
+ $self->meta->get_all_methods
),
);
} else {
Index: Devel-REPL/lib/Devel/REPL/Plugin/CompletionDriver/Methods.pm
===================================================================
--- Devel-REPL/lib/Devel/REPL/Plugin/CompletionDriver/Methods.pm (revisión: 5883)
+++ Devel-REPL/lib/Devel/REPL/Plugin/CompletionDriver/Methods.pm (copia de trabajo)
@@ -58,7 +58,7 @@
return $orig->(@_),
grep { $_ =~ $re }
map { $_->{name} }
- $metaclass->compute_all_applicable_methods;
+ $metaclass->get_all_methods;
};
1;
Subject: | stacktrace.txt |
The compute_all_applicable_methods method is deprecated. Use get_all_methods instead.
at /usr/local/lib/perl/5.10.0/Class/MOP/Class.pm line 736
Class::MOP::Class::compute_all_applicable_methods('Class::MOP::Class::__ANON__::SERIAL::97=HASH(0xa46b120)') called at /usr/local/share/perl/5.10.0/Devel/REPL/Plugin/CompletionDriver/Methods.pm line 60
Class::MOP::Class:::around('CODE(0xa43a4e8)', 'Class::MOP::Class::__ANON__::SERIAL::55=HASH(0x9e51688)', '', 'PPI::Document=HASH(0xa4db1f8)') called at /usr/local/lib/perl/5.10.0/Class/MOP/Method/Wrapped.pm line 139
Class::MOP::Method::Wrapped::__ANON__('Class::MOP::Class::__ANON__::SERIAL::55=HASH(0x9e51688)', '', 'PPI::Document=HASH(0xa4db1f8)') called at /usr/local/lib/perl/5.10.0/Class/MOP/Method/Wrapped.pm line 89
Class::MOP::Class::__ANON__::SERIAL::52::complete('Class::MOP::Class::__ANON__::SERIAL::55=HASH(0x9e51688)', '', 'PPI::Document=HASH(0xa4db1f8)') called at /usr/local/share/perl/5.10.0/Devel/REPL/Plugin/Completion.pm line 56
Class::MOP::Class::__ANON__::SERIAL::47::_completion('Class::MOP::Class::__ANON__::SERIAL::55=HASH(0x9e51688)', '', 'LabBook->', 9, 9) called at /usr/local/share/perl/5.10.0/Devel/REPL/Plugin/Completion.pm line 39
Devel::REPL::Plugin::Completion::__ANON__('', 'LabBook->', 9, 9) called at /usr/lib/perl5/Term/ReadLine/Gnu.pm line 701
Term::ReadLine::Gnu::AU::__ANON__('Term::ReadLine=HASH(0x9bf5170)', '\x{1}\x{1b}[4m\x{2}$ \x{1}\x{1b}[24m\x{2}') called at /usr/lib/perl5/Term/ReadLine/Gnu.pm line 316
Term::ReadLine::Gnu::readline('Term::ReadLine=HASH(0x9bf5170)', '$ ') called at /usr/local/share/perl/5.10.0/Devel/REPL.pm line 99
Devel::REPL::read('Class::MOP::Class::__ANON__::SERIAL::55=HASH(0x9e51688)') called at /usr/local/share/perl/5.10.0/Devel/REPL/Plugin/History.pm line 19
Class::MOP::Class:::around('CODE(0x9c6ea10)', 'Class::MOP::Class::__ANON__::SERIAL::55=HASH(0x9e51688)') called at /usr/local/lib/perl/5.10.0/Class/MOP/Method/Wrapped.pm line 139
Class::MOP::Method::Wrapped::__ANON__('Class::MOP::Class::__ANON__::SERIAL::55=HASH(0x9e51688)') called at /usr/local/lib/perl/5.10.0/Class/MOP/Method/Wrapped.pm line 89
Class::MOP::Class::__ANON__::SERIAL::40::read('Class::MOP::Class::__ANON__::SERIAL::55=HASH(0x9e51688)') called at /usr/local/share/perl/5.10.0/Devel/REPL/Plugin/MultiLine/PPI.pm line 20
Class::MOP::Class:::around('CODE(0x9e7b6f0)', 'Class::MOP::Class::__ANON__::SERIAL::55=HASH(0x9e51688)') called at /usr/local/lib/perl/5.10.0/Class/MOP/Method/Wrapped.pm line 139
Class::MOP::Method::Wrapped::__ANON__('Class::MOP::Class::__ANON__::SERIAL::55=HASH(0x9e51688)') called at /usr/local/lib/perl/5.10.0/Class/MOP/Method/Wrapped.pm line 89
Class::MOP::Class::__ANON__::SERIAL::46::read('Class::MOP::Class::__ANON__::SERIAL::55=HASH(0x9e51688)') called at /usr/local/lib/perl/5.10.0/Class/MOP/Method/Wrapped.pm line 48
Class::MOP::Method::Wrapped::__ANON__('Class::MOP::Class::__ANON__::SERIAL::55=HASH(0x9e51688)') called at /usr/local/lib/perl/5.10.0/Class/MOP/Method/Wrapped.pm line 89
Class::MOP::Class::__ANON__::SERIAL::47::read('Class::MOP::Class::__ANON__::SERIAL::55=HASH(0x9e51688)') called at /usr/local/share/perl/5.10.0/Devel/REPL.pm line 53
Devel::REPL::run_once('Class::MOP::Class::__ANON__::SERIAL::55=HASH(0x9e51688)') called at /usr/local/share/perl/5.10.0/Devel/REPL.pm line 39
eval {...} called at /usr/local/share/perl/5.10.0/Devel/REPL.pm line 39
Devel::REPL::run_once_safely('Class::MOP::Class::__ANON__::SERIAL::55=HASH(0x9e51688)') called at /usr/local/share/perl/5.10.0/Devel/REPL.pm line 31
Devel::REPL::run('Class::MOP::Class::__ANON__::SERIAL::55=HASH(0x9e51688)') called at /usr/local/share/perl/5.10.0/Devel/REPL/Script.pm line 82
Devel::REPL::Script::run('Devel::REPL::Script=HASH(0x9e4de08)') called at /usr/local/share/perl/5.10.0/Devel/REPL/Script.pm line 88
Devel::REPL::Script::import('Devel::REPL::Script', 'run') called at /usr/local/bin/re.pl line 3
main::BEGIN() called at /usr/local/share/perl/5.10.0/Devel/REPL/Script.pm line 3
eval {...} called at /usr/local/share/perl/5.10.0/Devel/REPL/Script.pm line 3
The compute_all_applicable_methods method is deprecated. Use get_all_methods instead.
at /usr/local/lib/perl/5.10.0/Class/MOP/Class.pm line 736
Class::MOP::Class::compute_all_applicable_methods('Class::MOP::Class::__ANON__::SERIAL::97=HASH(0xa46b120)') called at /usr/local/share/perl/5.10.0/Devel/REPL/Plugin/CompletionDriver/Methods.pm line 60
Class::MOP::Class:::around('CODE(0xa43a4e8)', 'Class::MOP::Class::__ANON__::SERIAL::55=HASH(0x9e51688)', '', 'PPI::Document=HASH(0xb0b0230)') called at /usr/local/lib/perl/5.10.0/Class/MOP/Method/Wrapped.pm line 139
Class::MOP::Method::Wrapped::__ANON__('Class::MOP::Class::__ANON__::SERIAL::55=HASH(0x9e51688)', '', 'PPI::Document=HASH(0xb0b0230)') called at /usr/local/lib/perl/5.10.0/Class/MOP/Method/Wrapped.pm line 89
Class::MOP::Class::__ANON__::SERIAL::52::complete('Class::MOP::Class::__ANON__::SERIAL::55=HASH(0x9e51688)', '', 'PPI::Document=HASH(0xb0b0230)') called at /usr/local/share/perl/5.10.0/Devel/REPL/Plugin/Completion.pm line 56
Class::MOP::Class::__ANON__::SERIAL::47::_completion('Class::MOP::Class::__ANON__::SERIAL::55=HASH(0x9e51688)', '', 'LabBook->', 9, 9) called at /usr/local/share/perl/5.10.0/Devel/REPL/Plugin/Completion.pm line 39
Devel::REPL::Plugin::Completion::__ANON__('', 'LabBook->', 9, 9) called at /usr/lib/perl5/Term/ReadLine/Gnu.pm line 701
Term::ReadLine::Gnu::AU::__ANON__('Term::ReadLine=HASH(0x9bf5170)', '\x{1}\x{1b}[4m\x{2}$ \x{1}\x{1b}[24m\x{2}') called at /usr/lib/perl5/Term/ReadLine/Gnu.pm line 316
Term::ReadLine::Gnu::readline('Term::ReadLine=HASH(0x9bf5170)', '$ ') called at /usr/local/share/perl/5.10.0/Devel/REPL.pm line 99
Devel::REPL::read('Class::MOP::Class::__ANON__::SERIAL::55=HASH(0x9e51688)') called at /usr/local/share/perl/5.10.0/Devel/REPL/Plugin/History.pm line 19
Class::MOP::Class:::around('CODE(0x9c6ea10)', 'Class::MOP::Class::__ANON__::SERIAL::55=HASH(0x9e51688)') called at /usr/local/lib/perl/5.10.0/Class/MOP/Method/Wrapped.pm line 139
Class::MOP::Method::Wrapped::__ANON__('Class::MOP::Class::__ANON__::SERIAL::55=HASH(0x9e51688)') called at /usr/local/lib/perl/5.10.0/Class/MOP/Method/Wrapped.pm line 89
Class::MOP::Class::__ANON__::SERIAL::40::read('Class::MOP::Class::__ANON__::SERIAL::55=HASH(0x9e51688)') called at /usr/local/share/perl/5.10.0/Devel/REPL/Plugin/MultiLine/PPI.pm line 20
Class::MOP::Class:::around('CODE(0x9e7b6f0)', 'Class::MOP::Class::__ANON__::SERIAL::55=HASH(0x9e51688)') called at /usr/local/lib/perl/5.10.0/Class/MOP/Method/Wrapped.pm line 139
Class::MOP::Method::Wrapped::__ANON__('Class::MOP::Class::__ANON__::SERIAL::55=HASH(0x9e51688)') called at /usr/local/lib/perl/5.10.0/Class/MOP/Method/Wrapped.pm line 89
Class::MOP::Class::__ANON__::SERIAL::46::read('Class::MOP::Class::__ANON__::SERIAL::55=HASH(0x9e51688)') called at /usr/local/lib/perl/5.10.0/Class/MOP/Method/Wrapped.pm line 48
Class::MOP::Method::Wrapped::__ANON__('Class::MOP::Class::__ANON__::SERIAL::55=HASH(0x9e51688)') called at /usr/local/lib/perl/5.10.0/Class/MOP/Method/Wrapped.pm line 89
Class::MOP::Class::__ANON__::SERIAL::47::read('Class::MOP::Class::__ANON__::SERIAL::55=HASH(0x9e51688)') called at /usr/local/share/perl/5.10.0/Devel/REPL.pm line 53
Devel::REPL::run_once('Class::MOP::Class::__ANON__::SERIAL::55=HASH(0x9e51688)') called at /usr/local/share/perl/5.10.0/Devel/REPL.pm line 39
eval {...} called at /usr/local/share/perl/5.10.0/Devel/REPL.pm line 39
Devel::REPL::run_once_safely('Class::MOP::Class::__ANON__::SERIAL::55=HASH(0x9e51688)') called at /usr/local/share/perl/5.10.0/Devel/REPL.pm line 31
Devel::REPL::run('Class::MOP::Class::__ANON__::SERIAL::55=HASH(0x9e51688)') called at /usr/local/share/perl/5.10.0/Devel/REPL/Script.pm line 82
Devel::REPL::Script::run('Devel::REPL::Script=HASH(0x9e4de08)') called at /usr/local/share/perl/5.10.0/Devel/REPL/Script.pm line 88
Devel::REPL::Script::import('Devel::REPL::Script', 'run') called at /usr/local/bin/re.pl line 3
main::BEGIN() called at /usr/local/share/perl/5.10.0/Devel/REPL/Script.pm line 3
eval {...} called at /usr/local/share/perl/5.10.0/Devel/REPL/Script.pm line 3