Add new more friendly Default profile
Chris Marshall [Mon, 14 Feb 2011 02:31:38 +0000 (21:31 -0500)]
This is from patch 2 of 4 submitted by Caleb Cushing.

lib/Devel/REPL/Profile/Default.pm [new file with mode: 0644]

diff --git a/lib/Devel/REPL/Profile/Default.pm b/lib/Devel/REPL/Profile/Default.pm
new file mode 100644 (file)
index 0000000..8bfa69d
--- /dev/null
@@ -0,0 +1,29 @@
+package Devel::REPL::Profile::Default;
+
+use Moose;
+use namespace::clean -except => [ 'meta' ];
+
+with 'Devel::REPL::Profile';
+
+sub plugins { qw(
+  Colors
+  Completion
+  CompletionDriver::INC
+  CompletionDriver::LexEnv
+  CompletionDriver::Keywords
+  CompletionDriver::Methods
+  History
+  LexEnv
+  DDS
+  Packages
+  Commands
+  MultiLine::PPI
+  ReadLineHistory
+);}
+
+sub apply_profile {
+  my ($self, $repl) = @_;
+  $repl->load_plugin($_) for $self->plugins;
+}
+
+1;