Acme-EyeDrops
view release on metacpan or search on metacpan
- new test: limit2.t to verify above bug fixed
- new test: sightly2.t
- made sure test programs clean up all .tmp files
- added -Mstrict to all test programs to ensure
they work with -w and 'use strict' too
- localised file globals appropriately in all test programs
- tested under Win98 and adjusted nasty.t accordingly
1.08 Sun Apr 21 16:13:18 2002
- documentation: added sub-sections to Examples section
- documentation: added 'Dueling Dingos' sub-section
- minor change to shape: pgolf
- new shape: eye
- new shape: mosquito
- new shape: coffee
- new shape: yanick
- new shape: yanick2
- new shape: yanick3
1.09 Sun May 19 17:09:12 2002
- new attributes: Reduce and Expand
- new attributes: RotateType and RotateFlip
- new functions: reduce_shape and expand_shape
- new rtype/flip parameters added to rotate_shape function
- rotate 90 and 270 now work, no longer squashed
- added support for new attributes to demo/sightly.pl
- new test: reshape.t (tests Reduce, Expand, Rotate)
- new test: camel.t
- documentation: added 'Thirty Two Camels' sub-section
- minor change to shape yanick (identical dimensions to camel now)
1.10 Wed May 29 19:08:11 2002
- new attribute: Compact
- function pour_sightly: added new compact parameter
- added support for Compact attribute to demo/sightly.pl
- test camel.t: enhanced with Compact tests
- documentation: increased from 'Thirty Two Camels'
to 'Twelve Thousand and Thirty Two Camels'
- documentation: improved 'Buffy Looking in the Mirror'
1.11 Sun Jun 30 11:02:09 2002
- new shape: alien
- documentation: minor improvements
- documentation: added 'Somersaulting Camels' section
1.12 Sun Aug 4 14:17:01 2002
- new shape: llama
- new shape: parrot
- new shape: simon
- new shape: jon
- new shape: yanick4
- new shape: tonick
- documentation: minor changes
- documentation: added 'Abbreviated History of Perl 6' section
1.13 Sun Sep 15 17:05:09 2002
- new shape: siertri
- new shape: undies
- minor change to shape: simon
- documentation: minor changes
- documentation: added 'Sierpinski Triangles' section
1.14 Sun Sep 22 18:42:14 2002
- converted siertri shape to a built-in (removed siertri.eye)
- documentation: retracted claim that Mtv's Sierpinski program
is the shortest (thankyou Adam and Eugene)
- documentation: minor changes
1.15 Sun Oct 6 19:31:14 2002
- code: minor changes
- documentation: minor changes
1.16 Sun Nov 3 19:31:14 2002
- new shape: schwern
- new shape: naw
- new shape: gelly
- minor change to shape: acme
- documentation: minor changes
- documentation: added 'Naked Arm Wrestling' section
1.17 Sun Dec 8 12:21:04 2002
- new shape from cam.pm: snow
- new program to generate table: demo/gentable.pl
- fixed bug where EyeDrops sometimes generated an
invalid program
- extended limit2.t (test 9) to verify above bug fixed
- minor code improvements
- new shape from cam.pm: beer
- new shape: campm
- minor change to shape: candle
- minor change to shape: china1
- documentation: minor changes
- minor code improvements
1.20 Sun Jan 12 12:21:55 2003
- documentation: added 'EyeDropping EyeDrops.pm' section
- minor code improvements
1.21 Sun Jan 19 14:01:12 2003
- documentation: minor changes
- minor code improvements
1.30 Sun Feb 23 17:19:04 2003
- new function: pour_text
- new attributes: Text, TextFiller
- added support for new attributes to demo/sightly.pl
- new test: text.t
- documentation: added 'Snowflakes' section
- minor code improvements
1.31 Sun Mar 30 18:16:14 2003
- FillerVar attribute: allow a simple string as an
alternative to a reference to filler variables
- limit.t, sightly.t: new test cases added
- added file: demo/hellotest.pl
- minor code improvements
- added Build.PL and adjusted Makefile.PL (thanks Ken)
- added META.yml
- new function: get_eye_string
- documentation: make_triangle, make_siertri, make_banner
- convert.t, sightly.t: new test cases added
1.33 Sat May 3 11:19:27 2003
- new shape: baghdad
- documentation: added 'Baghdad Bob' section
1.34 Sun June 8 23:42:05 2003
- documentation: added '99 Bottles of Beer' section
- new shapes: bottle, bottle2
- new function: hjoin_shapes
- new attributes: TrailingSpaces, RemoveNewlines
- added support for new attributes to demo/sightly.pl
- function make_banner: strip leading spaces if any
- new test: vshape.t
- reshape.t, sightly2.t: new test cases added
1.35 Sun June 15 09:09:59 2003
- Bug fix release for Perl 5.8.1 (see Perl bug #23143).
- For the first time, the EyeDrops test suite uncovered a Perl bug
(dance a little jig): recur.t, test 4 failed on Perl 5.8.1-RC2
with the error: panic: pad_free curpad. Thanks merlyn for reporting.
Since this bug won't be fixed for 5.8.1, we workaround
it by never using $_ as a filler variable
- sightly.t: run generated test programs in taint mode
- tests: renamed to more appropriate names
- tests: new long running test 13_to.t
- documentation: added "Getting Started" section
- documentation: fixed program in "Naked Arm Wrestling" section
- documentation: updated 'Abbreviated History of Perl 6' section
1.43 Sun Aug 31 17:12:55 2003
- new shapes: alpaca, bighorn, map_italy
- removed functions set_eye_dir, add_builtin_shape, del_builtin_shape
which were mistakenly added to version 1.41 (these are not really
necessary and change module state, which is a Bad Thing)
- documentation: added 'twang bra-strap' to acme shape description
- tests: merged old 13_to.t, old 12_Beer.t to new 19_surrounds.t
new Test::Pod test, 18_sky.t
- tests: improved the ugly test suite a little
new test: 16_astride.t simple threads test
new test: 17_Orange.t tests pod coverage
split 00_Coffee.t into two (last bit is now 15_Buffy.t)
added slurp_yerself() tests to 13_to.t
added Regex => 0 tests to 05_Parrot.t
exercise regex_binmode_print_sightly() in 05_Parrot.t
new tests added to 05_Parrot.t/06_not.t/10_Ponie.t et al
in response to gaping holes detected by Devel::Cover
removed exit 0 from end of tests
- documentation: added new Error Handling section
- Devel::Cover results: stmt branch cond sub pod total
95.2 91.3 90.8 100.0 100.0 93.5
1.46 Sat May 14 23:21:04 2005
- new shape: pugs
- new shape: pugs2
- minor code improvements (limited scope of %builtin_shapes)
- tests: fixed Test::More dependency in 17_Orange.t
simplified 18_sky.t (Test::Pod)
added invalid shape test to 14_gulp.t
1.47 Sat May 21 19:15:33 2005
- new shape: autrijus
- documentation: updated 'Abbreviated History of Perl 6' section
- tests: added new test to 05_Parrot.t
- Build.PL: simplified for Module::Build 0.26 and above
- Temporarily renamed Build.PL to xBuild.PL to stop CPAN tester
robots from using Build.PL (got a lot of unexplained failures
with v1.46, yet they worked fine when installed manually)
1.50 Sat August 6 23:08:42 2005
- First attempt at "shape properties" -- note that these
are experimental and subject to change in future releases
- new functions: get_eye_properties
find_eye_shapes
get_eye_keywords
- new internal functions: _get_properties
_get_eye_shapes
_get_eye_string
_get_eye_properties
_find_eye_shapes
_get_eye_keywords
- new attribute: EyeDir
- documentation: added 'Shape Properties' section
- new program: demo/findshapes.pl
- tests: added property tests to 13_to.t
- tests: adjusted 19_surrounds.t for .eyp files
- new shape: schwern2 (shape schwern without the banner)
1.51 Sun September 11 23:17:33 2005
- new shape: adrianh
- minor enhancements to demo/findshapes.pl
- tests: improved property tests in 13_to.t
- CPAN testers report occasional failures in test 01_mug
on Perl 5.10.0 with "Out of memory!". Don't know why.
Requires further investigation. Meanwhile, I'll try commenting
out parts of this test and see if the failures disappear.
1.54 Sun August 31 21:19:04 2008
- new shape: opera (thanks Cosimo)
- new shape: kangaroo
- new shape: moose
- new shape: moosecamel (modelled after http://irclog.perlgeek.de)
- new shape property keywords: logo, opera
- logo keyword shapes are: debian, opera, pgolf, mongers
1.55 Mon December 1 21:42:07 2008
- fixed rt #39035 "The Acme-EyeDrops Archive Contains World-Writable files"
- documentation: updated "99 Bottles of Beer" section with one stroke golf
improvement to mtve/thospel original shortest solution
1.60 Sat May 12 23:59:42 2012
- Bug fix release for upcoming Perl 5.16.0
- Dropped support for Perl 5.005; A::E now requires Perl 5.6 or higher
- Clarified Acme::EyeDrops license (thanks Jotam Jr. Trejo)
LICENSE and README were inconsistent with META.yml
all should be consistent now
- minor code improvements for perl 5.6+ requirement:
added "use warnings" to EyeDrops.pm
use lexical file handles now
can use readline() function now
- documentation: removed "A Slow Day" section
- documentation: added new "Victoria Bra, Secret Tango" section
- new shape: bra
- new shape: spider
- 01_mug.t: fixed rt #72163: perl -Mstrict -e 'open$['
'Can't use string ("0") as a symbol ref while "strict refs" in use'
This seems to be a long-standing perl bug fixed in 5.16
Fixed test simply by removing -Mstrict in 01_mug.t
- 16_astride.t: threads test, adjusted to avoid annoying
"Tests out of sequence" failure reports from CPAN testers
1.61 Mon May 20 21:59:42 2013
2: do not add a leading "use re 'eval';"
3: add a leading "use re 'eval';"
- Updated test suite to work with new Regex attribute
- Updated sightly.pl to work with new Regex attribute
1.62 Sun Apr 12 17:12:42 2015
- new shape: thumbsup
- new shape: heart2
- new shape: smiley4
- documentation: added new "Love Birds" section
lib/Acme/EyeDrops/map_world2.eye
lib/Acme/EyeDrops/map_world2.eyp
lib/Acme/EyeDrops/map_world3.eye
lib/Acme/EyeDrops/map_world3.eyp
lib/Acme/EyeDrops/merlyn.eye
lib/Acme/EyeDrops/merlyn.eyp
lib/Acme/EyeDrops/mongers.eye
lib/Acme/EyeDrops/mongers.eyp
lib/Acme/EyeDrops/moose.eye
lib/Acme/EyeDrops/moose.eyp
lib/Acme/EyeDrops/moosecamel.eye
lib/Acme/EyeDrops/moosecamel.eyp
lib/Acme/EyeDrops/mosquito.eye
lib/Acme/EyeDrops/mosquito.eyp
lib/Acme/EyeDrops/music.eye
lib/Acme/EyeDrops/music.eyp
lib/Acme/EyeDrops/naw.eye
lib/Acme/EyeDrops/naw.eyp
lib/Acme/EyeDrops/opera.eye
lib/Acme/EyeDrops/opera.eyp
lib/Acme/EyeDrops/panda.eye
lib/Acme/EyeDrops/panda.eyp
lib/Acme/EyeDrops.pm view on Meta::CPAN
}
sub get_eye_shapes { _get_eye_shapes(get_eye_dir()) }
sub get_eye_string { _get_eye_string(get_eye_dir(), shift) }
sub get_eye_properties { _get_eye_properties(get_eye_dir(), shift) }
sub get_eye_keywords { _get_eye_keywords(get_eye_dir()) }
sub find_eye_shapes { _find_eye_shapes(get_eye_dir(), @_) }
# $eye_dir is the directory containing the .eye file shapes.
# Note: $eye_dir is only eval-hostile line in EyeDrops.pm; do not change it
# for t/19_surrounds.t and "EyeDropping EyeDrops.pm" section of doco relies
# on it. Remove ".pm" from "...Acme/EyeDrops.pm" giving directory name.
my $eye_dir = __FILE__; chop($eye_dir);chop($eye_dir);chop($eye_dir);
sub slurp_yerself { _slurp_tfile($eye_dir . '.pm') }
sub get_eye_dir { $eye_dir }
1;
__END__
lib/Acme/EyeDrops.pm view on Meta::CPAN
sightly.pl -h (for help)
sightly.pl -s camel -f helloworld.pl -r 1 >new.pl
cat new.pl (should look like a camel)
perl new.pl (should print "hello world" as before)
Notice that the shape C<'camel'> is just the file F<camel.eye> in
the F<EyeDrops> sub-directory underneath where F<EyeDrops.pm> is located,
so you are free to add your own new shapes as required.
For the meaning of Regex => 1 above, see the I<Just another Perl hacker>
section below.
=head2 Making Your Programs Easier to Understand
If your boss demands a UML diagram describing your program, you
can give him this:
print sightly( { Shape => 'uml',
SourceFile => 'helloworld.pl',
Regex => 1 } );
lib/Acme/EyeDrops.pm view on Meta::CPAN
open$%;print+reverse<0>
and easier still for a self-printing shape:
open$%;print<0> # self printing
open$%;print+map{y;!-~;#;;$_}<0> # replace sightly with '#'
=head2 A Somersaulting Camel
Let's extend the Buffy example of the previous section to produce
a camel-shaped program capable of somersaulting across the screen
when run.
We start with a generator program, F<gencamel.pl>:
print sightly( { Regex => 1,
Compact => 1,
RemoveNewlines => 1,
Indent => 1,
BorderGapRight => 1,
lib/Acme/EyeDrops.pm view on Meta::CPAN
perl camel.pl v vertically-squashed camel
And can further combine the above options, each combination
producing a different camel, for example:
perl camel.pl uri
produces a large, bearded camel with a pony-tail, glasses,
and a tie-dyed T-shirt. :)
F<camel.pl> also accepts an optional second argument, specifying
the character to fill the camel with (default C<#>).
For example:
perl camel.pl hv small camel filled with #
perl camel.pl hv "$" small camel filled with $
Why 12,032 camels? Combining the main options q, m, i, u, r, h, v
can produce 128 different camels. And there are 94 printable
characters available for the second argument, making a total
of 128 * 94 = 12,032 camels.
=head2 Naked Arm Wrestling
The final auction at Y::E 2002 in Munich featured an epic athletic
contest which you can remember with:
use Acme::EyeDrops qw(sightly);
my $s = sightly( { Regex => 1,
Shape => 'naw',
lib/Acme/EyeDrops.pm view on Meta::CPAN
) ))))))))))))^+ (
('['));#;# ;
# ;#;# ;
# ;
# ;
# ; #
; # ;
#;#;#;#;#
On 15 August 2003, Perl/Parrot Euro-hacker and modern artist
Leon Brocard (pictured above) marched into a secluded
aranciate-blessed, orange-walled room at MoMA and tossed
a black Victoria's Secret bra (pictured below) into
the air, thereby creating a brilliant contemporary
site-specific art exhibit.
''=~('(?' .'{'.('['
^+ (( (( ((
(( (( (( ((
(( (( ( ((
(( (( (( ((
lib/Acme/EyeDrops.pm view on Meta::CPAN
Returns a hash reference keyed by keyword, with the
value being the list of shapes containing the keyword.
=item find_eye_shapes KEYWORDLIST
Returns a list of the I<eye> shapes in ascii-betical order
that contain all keywords in KEYWORDLIST.
The keywords in KEYWORDLIST are implicitly AND'ed together.
Additionally, you may use OR inside any KEYWORDLIST element.
If this is unclear, see the examples in "Shape Properties"
section below.
=item get_eye_string SHAPENAME
Given a .eye SHAPENAME, returns the shape string.
=item get_eye_properties SHAPENAME
Given a .eye SHAPENAME, returns a hash reference of
the shape properties or undef if the shape has no
properties.
lib/Acme/EyeDrops.pm view on Meta::CPAN
map_australia Map of Australia
map_italy Map of Italy
map_japan Map of Japan
map_uk Map of United Kingdom and Ireland
map_world1 World globe, Asian view
map_world2 World globe, African view
map_world3 World globe, American view
merlyn Just another Perl hacker, aka Randal L Schwartz
mongers Perl Mongers logo
moose A moose
moosecamel A moose and a camel (modelled after http://irclog.perlgeek.de)
mosquito A mosquito
music A musical symbol
naw Naked Arm Wrestling (Y::E 2002, Munich)
opera Opera browser logo (contributed by Cosimo)
panda A panda designed by Yanni Ellen Liu
parrot Originally an April fool's joke, the joke was that
it was not a joke
pgolf Perl Golf logo (inspired by `/anick)
pony Horizontal banner of "Pony"
pony2 Picture of a Pony
lib/Acme/EyeDrops.pm view on Meta::CPAN
F<http://archive.develooper.com/fwp@perl.org/msg03193.html>.
Similar sites exist for I<hello world> programs
F<http://www2.latech.edu/~acm/HelloWorld.shtml>,
and I<quines>
F<http://www.nyx.net/~gthompso/quine.htm>.
To learn more about HQ9+ programming visit
F<http://www.cliff.biffle.org/esoterica/hq9plus.html> and
F<http://search.cpan.org/dist/HQ9PLUS/>.
Perl Monks Obfuscation section.
In particular, ideas for EyeDrops shapes were got from:
F<http://www.perlmonks.org/index.pl?node_id=45213>
(Erudil's camel code),
F<http://www.perlmonks.org/index.pl?node_id=285157>
(Spaghetti Obfu),
F<http://www.perlmonks.org/index.pl?node_id=289733>
(Just another Bach Hacker),
F<http://www.perlmonks.org/index.pl?node_id=329174>
(hello world),
F<http://www.perlmonks.org/index.pl?node_id=188405>
lib/Acme/EyeDrops.pm view on Meta::CPAN
The cam.pm Obfuscated Programming Contests at
F<http://cam.pm.org/projects_home.shtml>.
I<Perl Golf> was played monthly at
F<http://perlgolf.sourceforge.net/> and is now played mostly at
F<http://codegolf.com/>. Ton Hospel's excellent generic
golf tester can be got from
F<http://www.xs4all.nl/~thospel/golf/gentest.pl>.
The C<--$|> idiom (exploited in the I<A Somersaulting Camel>
section) is "explained" in this thread:
F<http://archive.develooper.com/fwp@perl.org/msg01360.html>.
L<Acme::Bleach>
L<Acme::Smirch>
L<Acme::Buffy>
L<Acme::Pony>
L<Acme::ChuckNorris>
L<Acme::AsciiArt2HtmlTable>
L<Acme::AsciiArtinator>
lib/Acme/EyeDrops.pm view on Meta::CPAN
and Supremely Unorthodox Eric for provoking me.
I would also like to thank Ian Phillipps, Philip Newton,
Ryan King, Michael G Schwern, Robert G Werner, Simon Cozens,
and others on the fwp mailing list for their advice on
ASCII Art, imaging programs, and on which picture of
Larry to use.
Thanks also to Mtv Europe, Ronald J Kimball and Eugene
van der Pijll for their help in golfing the program in
the I<Twelve Thousand and Thirty Two Camels> section.
Keith Calvert Ivey also contributed some levity to this section.
The "Love Birds" section was provoked by Muss, Jiun and Taffy.
The thumbsup shape was derived from one originally designed by Jiun.
Ideas from Adam Antonik, Mtv Europe, Eugene van der Pijll, Ton Hospel
and Keith Calvert Ivey were used in the I<Sierpinski Triangles> section.
Thanks cog for the prod to add new Shape Properties feature.
The jon shape was derived from
F<http://www.spidereyeballs.com/os5/set1/small_os5_r06_9705.html>.
Kudos to Elaine -HFB- Ashton for showing me this.
The merlyn shape was derived from this photo
F<http://www.stonehenge.com/merlyn/my_real_proof.jpg>
of Randal singing a duet with Samantha Fox.
t/19_surrounds.t view on Meta::CPAN
#!/usr/bin/perl
# 19_surrounds.t
# Generate a new EyeDrops.pm as described in the doco:
# "EyeDropping EyeDrops.pm" section.
# Run various tests on the EyeDrop'ed EyeDrops.pm.
# Also generate sightly versions of 0..18 tests with a 'z' prefix.
# Since this test is very slow only run if the
# PERL_SMOKE environment variable is set.
#
# zsightly.t test works but the following might be written to stderr:
# Scalar found where operator expected at (eval 2) line 41, near "regex_eval_sightly($hellostr"
# This seems to happen only on Perl versions before 5.6.1. Is this a Perl bug?
use strict;
( run in 0.907 second using v1.01-cache-2.11-cpan-39bf76dae61 )