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
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
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<DEVEL_REPL_PROFILE> to
+C<SomeProfile>, or set the C<profile> key in your C<rcfile> (see
+L<Devel::REPL> for more information).
+
=head1 See Also
L<Devel::REPL>, L<Devel::REPL::Plugin>, L<Devel::REPL::Profile>
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;
--- /dev/null
+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;
has 'profile' => (
is => 'ro',
isa => 'Str',
- default => sub { $ENV{DEVEL_REPL_PROFILE} || 'Default' },
+ default => sub { $ENV{DEVEL_REPL_PROFILE} || 'Minimal' },
);
has '_repl' => (