Acme-DeepThoughts

 view release on metacpan or  search on metacpan

lib/Acme/DeepThoughts.pm  view on Meta::CPAN

package Acme::DeepThoughts;
$VERSION = '0.01';

my $glass = " \t"x8;
sub reflect { local $_ = unpack "b*", pop; tr/01/ \t/; s/(.{9})/$1\n/g; $glass.$_ }
sub deflect { local $_ = pop; s/^$glass|[^ \t]//g; tr/ \t/01/; pack "b*", $_ }
sub opaque  { $_[0] =~ /\S/ }
sub deep    { $_[0] =~ /^$glass/ }

open 0 or print "Can't open '$0'\n" and exit;
(my $thought = join "", <0>) =~ s/.*^\s*use\s+Acme::DeepThoughts\s*;\n\n(?:.*?--\s+Jack\s+Handey.*?\n)?//sm;

local $SIG{__WARN__} = \&opaque;
do {eval deflect $thought; exit} unless opaque $thought and not deep $thought;

my $DeepThought = '';
{
    my $rand = int rand 152;
    while($rand > 0){
        $DeepThought = <DATA>;
        $rand--;
    }
    close DATA;
    chomp $DeepThought;

    require Text::Wrap;
    local $Text::Wrap::columns = 72;

    my @lines = Text::Wrap::wrap('', '', $DeepThought);

    if(length $lines[-1] < 63 ){
        $lines[-1] .= "  --  Jack Handey";
    } else {
        push @lines, "        --  Jack Handey";
    }

    $DeepThought = join "\n",@lines;
}

open 0, ">$0" or print "Cannot ponder '$0'\n" and exit;
print {0} "use Acme::DeepThoughts;\n\n$DeepThought\n", reflect $thought and exit;

=head1 NAME

Acme::DeepThoughts - Jack Handey does perl


=head1 SYNOPSIS

    use Acme::DeepThoughts
    print "Hello world";

=head1 DESCRIPTION

The first time you run a program under C<use Acme::DeepThoughts>, the module
removes all the unsightly printable characters from 
your source file. The code continues to work exactly as it did before, 
but now it contains a I<Deep Thought>.

These deep thoughts were collected from E<lt>L<http://deepthoughts.330.ca/>E<gt>,
which is a site "I<dedicated to the quotes that used to appear on the hit TV show, Saturday Night Live (SNL)>."

=head1 BUGS

Please don't report bugs ;)
But if you really really need to, go to 
E<lt>http://rt.cpan.org/NoAuth/Bugs.html?Dist=Acme-DeepThoughtsE<gt>
or send mail to E<lt>bug-Acme-DeepThoughts#rt.cpan.orgE<gt>


=head1 AUTHOR

	D. H. (PODMASTER)

=head1 COPYRIGHT

This program is free software; you can redistribute
it and/or modify it under the same terms as Perl itself.

The full text of the license can be found in the
LICENSE file included with this module.


=head1 SEE ALSO

L<Acme::Bushisms|Acme::Bushisms>, L<Acme::Bleach|Acme::Bleach>,.

=cut

__DATA__
If I could be a bird, I'd be a Flying Purple People Eater because then people would sing about me and I could fly down and eat them because I hate that song.
When I die, I would like to go peacefully, in my sleep, like my Grandfather did.  Not screaming and yelling like the passenger in his car.
I think one way the cops could make extra money would be to hold a used murder weapons sale. Many people could really use cheap a ice pick.
If you ever reach total enlightenment while drinking beer, I bet beer would shoot out of you nose.
I believe in making the world safe for our children, but not our children's children, because I don't think children should be having sex.
Even though I was their captive, the Indians allowed me quite a bit of freedom. I could walk freely, make my own meals, and even hurl large rocks at their heads. It was only later that I discovered that they were not Indians at all but only dirty-clo...
I wish outer space guys would conquer the Earth and make people their pets, because I'd like to have one of those little beds with my name on it.
It's true that every time you hear a bell, an angel gets its wings. But what they don't tell you is that every time you hear a mouse trap snap, and Angel gets set on fire.
If you're in a war, instead of throwing a hand grenade at the enemy, throw one of those small pumpkins. Maybe it'll make everyone think how stupid war is, and while they are thinking, you can throw a real grenade at them.
I hope life isn't a big joke, because I don't get it.
The next time I have meat and mashed potatoes, I think I'll put a very large blob of potatoes on my plate with just a little piece of meat. And if someone asks me why I didn't get more meat, I'll just say, "Oh, you mean this?" and pull out a big piec...
Life, to me, is like a quiet forest pool, one that needs a direct hit from a big rock half-buried in the ground. You pull and you pull, but you can't get the rock out of the ground. So you give it a good kick, but you lose your balance and go skiddin...
Instead of studying for finals, what about just going to the Bahamas and catching some rays?  Maybe you'll flunk, but you might have flunked anyway; that's my point.
Sometimes, when I drive across the desert in the middle of the night, with no other cars around, I start imagining: What if there were no civilization out there? No cities, no factories, no people? And then I think: No people or factories? Then who m...
The whole town laughed at my great-grandfather, just because he worked hard and saved his money. True, working at the hardware store didn't pay much, but he felt it was better than what everybody else did, which was go up to the volcano and collect t...
Too bad when I was a kid there wasn't a guy in our class that everybody called the "Cricket Boy", because I would have liked to stand up in class and tell everybody, "You can make fun of the Cricket Boy if you want to, but to me he's just like everyb...
I think a good product would be "Baby Duck Hat". It's a fake baby duck, which you strap on top of your head. Then you go swimming underwater until you find a mommy duck and her babies, and you join them. Then, all of a sudden, you stand up out of the...
I wish I lived back in the old west days, because I'd save up my money for about twenty years so I could buy a solid-gold pick. Then I'd go out West and start digging for gold. When someone came up and asked what I was doing, I'd say, "Looking for go...
A funny thing to do is, if you're out hiking and your friend gets bitten by a poisonous snake, tell him you're going to go for help, then go about ten feet and pretend that you got bit by a snake. Then start an argument with him about whose going to ...
I guess I kinda lost control, because in the middle of the play I ran up and lit the evil puppet villain on fire. No, I didn't. Just kidding. I just said that to help illustrate one of the human emotions, which is freaking out. Another emotion is gre...
Many people think that history is a dull subject. Dull? Is it "dull" that Jesse James once got bitten on the forehead by an ant, and at first it didn't seem like anything, but then the bite got worse and worse, so he went to a doctor in town, and the...
I scrambled to the top of the precipice where Nick was waiting. "That was fun," I said. "You bet it was," said Nick. "Let's climb higher." "No," I said. "I think we should be heading back now." "We have time," Nick insisted. I said we didn't, and Nic...
If you're a Thanksgiving dinner, but you don't like the stuffing or the cranberry sauce or anything else, just pretend like you're eating it, but instead, put it all in your lap and form it into a big mushy ball. Then, later, when you're out back hav...
When I was in the 3rd grade, a bully in school started beating me up every day.  At first I didn't say anything, but then I told dad.  He got a real scared look on his face and asked if the bully had a big dad.  I said I didn't know. But he still see...
I remember that one fateful day when Coach took me aside. I knew what was coming. "You don't have to tell me," I said. "I'm off the team, aren't I?" "Well," said Coach, "you never were really ON the team. You made that uniform you're wearing out of r...
If I ever opened a trampoline store, I don't think I'd call it Trampo-Land, because you might think it was a store for tramps, which is not the impression we are trying to convey with our store. On the other hand, we would not prohibit tramps from br...
I can still recall old Mister Barnslow getting out every morning and nailing a fresh load of tadpoles to the old board of his. Then he'd spin it round and round, like a wheel of fortune, and no matter where it stopped he'd yell out, "Tadpoles! Tadpol...
Once when I was in Hawaii, on the island of Kauai, I met a mysterious old stranger. He said he was about to die and wanted to tell someone about the treasure. I said, "Okay, as long as it's not a long story. Some of us have a plane to catch, you know...
I bet a fun thing would be to go way back in time to where there was going to be an eclipse and tell the cave men, "If I have come to destroy you, may the sun be blotted out from the sky." Just then the eclipse would start, and they'd probably try to...
I wouldn't be surprised if someday some fishermen caught a big shark and cut it open, and there inside was a whole person. Then they cut the person open, and in him is a little baby shark. And in the baby shark there isn't a person, because it would ...
Whenever anyone says "I can't," it makes me wish he'd get stung to death by about ten thousand bees. When he says "I'll try," five thousand bees. ("I can," one bee.)
A wise man would pick up a grain of sand and envision the entire universe, a stupid man would role in seaweed, stand up, and say, "Look, I'm vine man."
Instead of crucifying people on crosses, why not on windmills?  That way, they get the pain, and the dizziness.
When I found the skull in the woods, the first thing I did was call the police.  But then I got curious about it.  I picked it up, and started wondering who this person was, and why he had deer horns.
If you work on a lobster boat, sneaking up behind people and pinching them is probably a joke that gets old real fast.
If i was being executed by lethal injection, I'd clean up my cell real neat.  Then when they came to get me, I'd say, "Injection?  I thought you said inspection."  Then maybe they might end up feeling real bad, and maybe i could get out of it.
I remember one day I was at Grandpa's farm and I asked him about sex. He sort of smiled and said, "Maybe instead of telling you what sex is, why don't we go out to the horse pasture and I'll show you." So we did, and there on the ground were my paren...
You know what would be the most terrifying thing that could ever happen to a flea? Getting caught inside a watch somehow. You don't even care, do you.
I remember when I was in the army, we had the toughest drill sergeant in the world. He'd get right up next to your face and yell, and if you didn't have the right answers, mister, you'd be peeling potatoes or changing the latrine. Hey, wait. I wasn't...
Instead of a trap door, what about a trap window? The guy looks out it, and if he leans too far, he falls out. Wait. I guess that's like a regular window.
The old pool shooter had won many a game in his life. But now it was time to hang up the cue. When he did, all the other cues came crashing to the floor. "Sorry," he said with a smile.
A man doesn't automatically get my respect. He has to get down in the dirt and beg for it.
I bet a funny thing about driving a car off a cliff is, while you're in midair, you still hit those brakes! Hey, better try the emergency brake!
Even though he was an enemy of mine, I had to admit that what he had accomplished was a brilliant piece of strategy. First, he punched me, then he kicked me, then he punched me again.
To us, it might look like just a rag. But to the brave, embattled men of the fort, it was more than that. It was a flag of surrender. And after that, it was torn up and used for shoe-shine rags, so the men would look nice for the surrender.
If you go to a party, and you want to be the popular one at the party, do this: Wait until no one is looking, then kick a burning log out of the fireplace onto the carpet. Then jump on top of it with your body and yell, "Log o' fire! Log o' fire!" I'...
You know what's probably a good thing to hang on your porch in the summertime, to keep mosquitoes away from you and your guests? Just a big bag of blood.
If you're traveling in a time machine, and you're eating corn on the cob, I don't think it's going to affect things one way or the other. But here's the point I'm trying to make: Corn on the cob is good, isn't it.
When I was a child, there were times when we had to entertain ourselves. And usually the best way to do that was to turn on the TV.
It's easy to sit there and say you'd like to have more money. And I guess that's what I like about it. It's easy. Just sitting there, rocking back and forth, wanting that money.
If I ever become a mummy, I'm going to have it so when somebody opens my lid, a boxing glove on a spring shoots out.
Broken promises don't upset me. I just think, why did they believe me?
What is it about a beautiful sunny afternoon, with the birds singing and the wind rustling through the leaves, that makes you want to get drunk? And after you're real drunk, maybe go down to the public park and stagger around and ask people for money...
If you ever go temporarily insane, don't shoot somebody, like a lot of people do. Instead, try to get some weeding done, because you'd really be surprised.
It's really sad when a family can be torn apart by something as simple as wild dogs.
Sometimes you have to be careful when selecting a new nickname for yourself. For instance, let's say you have chosen the nickname "Fly Head."  Normally, you would think that "Fly Head" would mean a person who had beautiful swept-back features, as if ...
I think college administrators should encourage students to urinate on walls and bushes, because then when students from another college come sniffing around, they'll know this is someone else's territory.
I think somebody should come up with a way to breed a very large shrimp.  That way, you could ride him, then after you camped at night, you could eat him. How about it, science?
If your friend is already dead, and being eaten by vultures, I think it's okay to feed some bits of your friend to one of the vultures, to teach him to do some tricks.  But ONLY if you're serious about adopting the vulture.
At first I thought, if I were Superman, a perfect secret identity would be "Clark Kent, Dentist," because you could save money on tooth X-rays. But then I thought, if a patient said, "How's my back tooth?" and you just looked at it with your X-ray vi...



( run in 0.509 second using v1.01-cache-2.11-cpan-cdf2f3d4e48 )