use strict; use warnings; use overload; my %D; sub quux { +undef }; su +b quuuux { goto \&overload::constant } sub quuux { my $x = close STDIN; +# overload::constant J => sub { 1 }; print quux; *quux = sub { "Hello" } +; $x="William".tell STDIN and select($x+=1,undef,undef,0.1);%D=(q=>quux( +) ,$x);$x=''.!!delete $D{$x};telldir(\*STDIN)or quuuux%D;%D=bless({},$x) +; printf STDIN "%d",$x;last}sub quuuuux{quuux for 1;rewinddir$_ or liste +n ($_,1)for\*STDIN;my$z=\(quux);substr($z,0,1)=quuuux integer=>$$z;quuuu +x pack("C",-1)&"\x4B",sub{42};last}quuuuux for 1;%D = {};use Carp;carp", +"
use Moops; class Cow :rw { has name => (default => 'Ermintrude') }; say Cow->new->name

Replies are listed 'Best First'.
Re: use warnings qw( japh );
by Athanasius (Archbishop) on Jun 07, 2014 at 09:38 UTC

    ++tobyink, very clever!

    Here is an augmented version that presents the output in a more conventional format:

    use Capture::Tiny 'capture_stderr'; $_=capture_stderr{ use strict; use warnings; use overload; our%D; sub quux { +undef } +; sub quuuux { goto \&overload::constant } sub quuux { my $x = close STD +IN; # overload::constant J => sub { 1 }; print quux; *quux = sub { "Hell +o" }; $x="William".tell STDIN and select($x+=1,undef,undef,0.1);%D=(q=>q +uux() ,$x);$x=''.!!delete $D{$x};telldir(\*STDIN)or quuuux%D;%D=bless({} +,$x); printf STDIN "%d",$x;last}sub quuuuux{quuux for 1;rewinddir$_ or l +isten ($_,1)for\*STDIN;my$z=\(quux);substr($z,0,1)=quuuux integer=>$$z;q +uuuux pack("C",-1)&"\x4B",sub{42};last}quuuuux for 1;%D = {};use Carp;ca +rp"," };$f=substr($_,0,1),$s=substr($_,1,1),print lc($f eq"'"?$s:$f)for spli +t/\n/

    I have made one change to the original obfu: my %D; is now our%D;. This is to remove a warning message which otherwise “escapes” through the Capture::Tiny net. See Variable "%data" is not available and ikegami’s reply. But I don’t understand why this warning isn’t captured along with all the others?

    This reminds me of an old whodunnit: Landscape with Dead Dons by Robert Robinson (1956), which BTW is a great read. (To elaborate on why this japh reminds me of that book would constitute a spoiler to both the japh and the book!)

    Athanasius <°(((><contra mundum Iustus alius egestas vitae, eros Piratica,

Re: use warnings qw( japh );
by choroba (Cardinal) on Jun 07, 2014 at 08:30 UTC
    Took me a while. I almost started a reply "What Perl version do I need to run it?", then I noticed the title again... :-)
    لսႽ† ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ
Re: use warnings qw( japh );
by Tux (Canon) on Jun 09, 2014 at 07:09 UTC

    Very original. I like it!


    Enjoy, Have FUN! H.Merijn