From: Karen Etheridge Date: Thu, 12 Sep 2013 00:41:08 +0000 (-0700) Subject: move Default profile to Standard; default profile is now Minimal X-Git-Tag: v1.003023~2 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=584978c990ea260400f416af78fe316f5fa7f0d2;p=p5sagit%2FDevel-REPL.git move Default profile to Standard; default profile is now Minimal --- diff --git a/Changes b/Changes index 59f0058..e3da483 100644 --- a/Changes +++ b/Changes @@ -1,6 +1,8 @@ Revision history for {{ $dist->name }} {{ $NEXT }} + - The default profile is now "Minimal", not "Default", as Default requires + some optional features; Default renamed to Standard (RT#88615) 1.003022 2013-09-10 01:53:10Z (Karen Etheridge) - workaround added for plugins consuming plugins that use optional features diff --git a/lib/Devel/REPL/Overview.pod b/lib/Devel/REPL/Overview.pod index 3d7b81d..a71fd23 100644 --- a/lib/Devel/REPL/Overview.pod +++ b/lib/Devel/REPL/Overview.pod @@ -226,10 +226,9 @@ There are lots of contributed plugins you can find at CPAN. If plugins change and extend functionality of Devel::REPL, profiles are changing your environment (loaded plugins, constants, subs and etc.). -There's only one bundled profile called `Devel::REPL::Profile::Default`, lets -take a look at it: +For example, the Minimal profile, `Devel::REPL::Profile::Minimal`: - package Devel::REPL::Profile::Default; + package Devel::REPL::Profile::Minimal; use Moose; ### advanced OOP system for Perl @@ -253,11 +252,17 @@ take a look at it: 1; -At the moment there are no profiles on CPAN. Mostly you'll use control files. +There is also the 'Standard' profile, which contains a number of optional (yet +very useful) features. + To enable some profile use --profile switch: $ re.pl --profile SomeProfile +Alternatively, you can set the environment variable C to +C, or set the C key in your C (see +L for more information). + =head1 See Also L, L, L diff --git a/lib/Devel/REPL/Profile/Default.pm b/lib/Devel/REPL/Profile/Default.pm index dc00876..05f4547 100644 --- a/lib/Devel/REPL/Profile/Default.pm +++ b/lib/Devel/REPL/Profile/Default.pm @@ -3,27 +3,8 @@ package Devel::REPL::Profile::Default; use Moose; use namespace::autoclean; -with 'Devel::REPL::Profile'; +# for backcompat only - Default was renamed to Standard -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; -} +extends 'Devel::REPL::Profile::Standard'; 1; diff --git a/lib/Devel/REPL/Profile/Standard.pm b/lib/Devel/REPL/Profile/Standard.pm new file mode 100644 index 0000000..29028f5 --- /dev/null +++ b/lib/Devel/REPL/Profile/Standard.pm @@ -0,0 +1,29 @@ +package Devel::REPL::Profile::Standard; + +use Moose; +use namespace::autoclean; + +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; diff --git a/lib/Devel/REPL/Script.pm b/lib/Devel/REPL/Script.pm index fe01d53..fb1e953 100644 --- a/lib/Devel/REPL/Script.pm +++ b/lib/Devel/REPL/Script.pm @@ -19,7 +19,7 @@ has 'rcfile' => ( has 'profile' => ( is => 'ro', isa => 'Str', - default => sub { $ENV{DEVEL_REPL_PROFILE} || 'Default' }, + default => sub { $ENV{DEVEL_REPL_PROFILE} || 'Minimal' }, ); has '_repl' => (