X-Git-Url: http://git.vpit.fr/?a=blobdiff_plain;f=lib%2Fwith.pm;h=cbc8f3df3c69d23abacd6c332f44666bed3cd582;hb=HEAD;hp=09de93f1c7ba5926fe8a516d32f79bec01d93183;hpb=faafb12810e0a10b845ecc4bc53c477bc09bc37b;p=perl%2Fmodules%2Fwith.git diff --git a/lib/with.pm b/lib/with.pm index 09de93f..cbc8f3d 100644 --- a/lib/with.pm +++ b/lib/with.pm @@ -1,16 +1,16 @@ package with; -use 5.009004; +use 5.009_004; use strict; use warnings; -use Carp qw/croak/; +use Carp qw; use Filter::Util::Call; -use Text::Balanced qw/extract_variable extract_quotelike extract_multiple/; -use Scalar::Util qw/refaddr set_prototype/; +use Text::Balanced qw; +use Scalar::Util qw; -use Sub::Prototype::Util qw/flatten wrap/; +use Sub::Prototype::Util qw; =head1 NAME @@ -18,11 +18,17 @@ with - Lexically call methods with a default object. =head1 VERSION -Version 0.02 +Version 0.03 =cut -our $VERSION = '0.02'; +our $VERSION = '0.03'; + +=head1 WARNING + +This module was an early experiment which turned out to be completely unpractical. +Therefore its use is officially B. +Please don't use it, and don't hesitate to contact me if you want to reuse the namespace. =head1 SYNOPSIS @@ -96,15 +102,15 @@ my $extractor = [ ]; my %skip; -$skip{$_} = 1 for qw/my our local sub do eval goto return +$skip{$_} = 1 for qw; -my @core = qw/abs accept alarm atan2 bind binmode bless caller chdir chmod +my @core = qw; my %core; $core{$_} = prototype "CORE::$_" for @core; @@ -293,7 +299,7 @@ sub import { : exists $core{$1} ? corewrap $1, $2 : subwrap $1, $2, prototype($caller.'::'.$1) /sexg; - s/\Q$;\E(\C{4})\Q$;\E/${$components[unpack('N',$1)]}/g; + s/\Q$;\E([\x00-\xff]{4})\Q$;\E/${$components[unpack('N',$1)]}/g; $_ .= $lastline if defined $lastline; return $count; } @@ -384,7 +390,7 @@ A fair part of this module is widely inspired from L (especially =head1 COPYRIGHT & LICENSE -Copyright 2008 Vincent Pit, all rights reserved. +Copyright 2008,2017 Vincent Pit, all rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.