X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=p5sagit%2FDevel-REPL.git;a=blobdiff_plain;f=lib%2FDevel%2FREPL%2FPlugin%2FNopaste.pm;h=c3183c6a24339c6d9c214c06284e52d52e0c0be5;hp=accba68085865d4189f95df518b575ad6601ba05;hb=e73ba6daf10d1d86070fd978092f9731310b410d;hpb=8d3a08168a12af4e191b519b19c5905de964181f diff --git a/lib/Devel/REPL/Plugin/Nopaste.pm b/lib/Devel/REPL/Plugin/Nopaste.pm index accba68..c3183c6 100644 --- a/lib/Devel/REPL/Plugin/Nopaste.pm +++ b/lib/Devel/REPL/Plugin/Nopaste.pm @@ -1,9 +1,10 @@ +use strict; +use warnings; package Devel::REPL::Plugin::Nopaste; use Devel::REPL::Plugin; -use MooseX::AttributeHelpers; -use Moose::Util::TypeConstraints; -use namespace::clean -except => [ 'meta' ]; +use Moose::Util::TypeConstraints 'enum'; +use namespace::autoclean; use Scalar::Util qw(blessed); sub BEFORE_PLUGIN { @@ -12,13 +13,13 @@ sub BEFORE_PLUGIN { } has complete_session => ( - metaclass => 'String', + traits => ['String'], is => 'rw', isa => 'Str', lazy => 1, default => '', - provides => { - append => 'add_to_session', + handles => { + add_to_session => 'append', }, ); @@ -115,7 +116,7 @@ the nopaste site. For example: C<#pastetitle example of some code> -defaults to 'Devel::REPL session' +defaults to C<'Devel::REPL session'>. =head1 CONFIGURATION @@ -133,7 +134,7 @@ The default of commenting out the output would be set like this: C<< $_REPL->nopaste_format( 'comment_output' ); >> -These options can be set during a Devel::REPL session, but only affect +These options can be set during a L session, but only affect the future parts of the session, not the past parts. =head1 AUTHOR