Acme-ConspiracyTheory-Random

 view release on metacpan or  search on metacpan

lib/Acme/ConspiracyTheory/Random.pm  view on Meta::CPAN

use 5.012;
use strict;
use warnings;

# Artificial stupidity is easier to develop than artificial intelligence. 

package Acme::ConspiracyTheory::Random;

our $AUTHORITY = 'cpan:TOBYINK';
our $VERSION   = '0.015';

use Exporter::Shiny qw( theory bad_punctuation );
use List::Util 1.54 ();

sub _RANDOM_ {
	my $code = List::Util::sample( 1, @_ );
	ref($code) eq 'CODE' ? goto($code) : $code;
}

sub _MERGE_ {
	my ( $redstring, %new ) = @_;
	%$redstring = ( %$redstring, %new );
}

sub _UCFIRST_ ($) { # Some sentences start with a non-word character like a quote mark
	( my $str = shift )
		=~ s/ (\w) / uc($1) /xe;
	$str;
}

sub celebrity {
	my $redstring = shift // {};
	my $celeb = _RANDOM_(
		{ female => 0, name => 'Bill Gates' },
		{ female => 0, name => 'Jeff Bezos' },
		{ female => 1, name => 'Hillary Clinton' },
		{ female => 0, name => 'Donald Trump' },
		{ female => 0, name => 'Barack Obama' },
		{ female => 0, name => 'Bernie Sanders' },
		{ female => 0, name => 'Joe Biden' },
		{ female => 0, name => 'Bill Clinton' },
		{ female => 1, name => 'King Charles III' },
		{ female => 0, name => 'Johnny Depp' },
		{ female => 0, name => 'Q' },
		{ female => 1, name => 'Madonna' },
		{ female => 0, name => 'Sir Paul McCartney' },
		{ female => 1, name => 'Lady Gaga' },
		{ female => 1, name => 'Margaret Thatcher' },
		{ female => 0, name => 'George Soros' },
		{ female => 1, name => 'Beyonce' },
		{ female => 1, name => 'Whitney Houston' },
		{ female => 0, name => 'Joe Rogan' },
		{ female => 1, name => 'Marjorie Taylor Greene' },
		{ female => 0, name => 'Rishi Sunak' },
		{ female => 0, name => 'Vladimir Putin' },
		{ female => 0, name => 'Ron DeSantis' },
		{ female => 1, name => 'Lauren Opal Boebert' },
		{ female => 0, name => 'Elon Musk' },
	);
	_MERGE_( $redstring, celebrity => $celeb );
	return $celeb->{name};
}

sub shady_group {
	my $redstring = shift // {};
	
	my $xx;
	PICK: {
		$xx = _RANDOM_(
			{ plural => 1, name => 'the Knights Templar', shortname => 'the Templars' },
			{ plural => 1, name => 'the Illuminati' },
			{ plural => 1, name => 'the Freemasons', shortname => 'the Masons' },
			{ plural => 0, name => 'the Ordo Templi Orientis' },
			{ plural => 1, name => 'the Cabalists' },
			{ plural => 1, name => 'the Followers of the Temple Of The Vampire', shortname => 'the Vampires' },
			{ plural => 0, splural => 1, name => 'the Secret Order of the Knights of the Round Table', shortname => 'the Knights' },
			{ plural => 1, name => 'the Cardinals of the Catholic Church', shortname => 'the Cardinals' },
			{ plural => 0, name => 'the Church of Satan', shortname => 'the Church' },
			{ plural => 1, name => 'the Gnostics' },
			{ plural => 1, name => 'the Elders of Zion', shortname => 'the Elders' },
			{ plural => 1, name => 'the Jesuits' },
			{ plural => 0, name => 'the Babylonian Brotherhood', shortname => 'the Brotherhood' },
			{ plural => 0, name => 'the Hermetic Order of the Golden Dawn', shortname => 'the Order' },
			{ plural => 0, name => 'Opus Dei' },
			{ plural => 0, name => 'the Priory of Sion', shortname => 'the Priory' },

lib/Acme/ConspiracyTheory/Random.pm  view on Meta::CPAN

				sub {
					$redstring->{topic} = { name => 'kidnapping', plural => 0 };
					$redstring->{random_place} //= 'Alabama';
					"aliens abduct people for probing";
				},
				sub {
					$redstring->{topic} = { name => 'CERN', plural => 0 };
					$redstring->{random_place} //= 'Switzerland';
					"the large hadron collider will destroy the planet";
				},
				sub {
					$redstring->{topic} = { name => 'steal beams', plural => 1 };
					$redstring->{random_place} //= 'New York';
					"9/11 was an inside job";
				},
				sub {
					my $badevent = _RANDOM_(
						'Columbine',
						'Sandy Hook',
						'the Boston Marathon Bombing',
						'Malaysia Airlines Flight 370',
						'the JFK assassination',
						'Project Monarch',
						'the 1993 WTC bombing',
						'the 2017 hurricane season (Project Geostorm)',
						'Deepwater Horizon',
					);
					$redstring->{topic} = { name => 'false flag operations', plural => 1 };
					"$badevent was orchestrated by the US government";
				},
				sub {
					$redstring->{topic} = { name => 'glaciers', plural => 1 };
					$redstring->{random_place} //= 'Greenland';
					"global warming is a hoax";
				},
				sub {
					$redstring->{topic} = { name => 'geology', plural => 0 };
					'the US government knows exactly when Yellowstone will erupt';
				},
				sub {
					$redstring->{topic} = { name => 'cloud seeding', plural => 0 };
					"the government controls the weather";
				},
				sub {
					$redstring->{topic} = { name => 'Snapple', plural => 0 };
					"Snapple is owned by the KKK";
				},
				sub {
					my $disease = disease( $redstring );
					$redstring->{topic} = { name => 'biological warfare', plural => 0 };
					"$disease was developed as a bioweapon";
				},
				sub {
					$redstring->{topic} = { name => 'gas chambers', plural => 1 };
					$redstring->{random_place} //= 'Germany';
					"the holocaust never happened";
				},
				sub {
					$redstring->{topic} = { name => 'fascism', plural => 0 };
					$redstring->{random_place} //= 'Australia';
					"Antifa International have been starting wildfires";
				},
				sub {
					$redstring->{topic} = { name => 'phantom time', plural => 0 };
					"the years between 614 and 911 never happened";
				},
				sub {
					$redstring->{topic} = { name => 'Nazis', plural => 1 };
					"there is a Nazi base on the moon";
				},
				sub {
					$redstring->{topic} = { name => 'Nazis', plural => 1 };
					"there is a Nazi base in Antarctica";
				},
				sub {
					$redstring->{topic} = { name => 'wrestling', plural => 0 };
					"all professional sports are scripted";
				},
				sub {
					my $website = website( $redstring );
					my $spies   = _RANDOM_(
						'spies',
						'the CIA',
						'GCHQ',
						'the NSA',
						'the Kremlin',
						'Ipsos MORI',
						sub {
							my $g = shady_group( $redstring );
							$redstring->{shady_group}{plural} ? $g : "spies from $g";
						}
					);
					$redstring->{topic} = { name => 'biscuits', plural => 1 };
					"$spies are using cookies to see everything you look at on $website";
				},
			);
		},
		sub {
			$redstring->{topic} = { name => 'the Mandela effect', plural => 0 };
			_RANDOM_(
				'Looney Tunes used to be Looney Toons',
				'the Berenstain Bears used to be spelled Berenstein',
				'Curious George used to have a tail',
				'Febreze used to have another E in it',
				'Froot Loops used to be Fruit Loops',
				'the Monopoly man is supposed to have a monocle',
				'Kitkat used to have a hyphen',
				'the Mona Lisa used to smile more',
				'C-3PO never used to have a silver leg',
				'Darth Vader said Luke I Am Your Father',
				'We Are the Champions used to say "of the world" at the end',
				'the USA used to have 52 states',
			);
		},
		sub {
			$redstring->{topic} = { name => 'the crusades', plural => 1 };
			my $subst = _RANDOM_(
				'TikTok',
				'Twitter',
				'the world wars',
				'intergalactic warfare',

lib/Acme/ConspiracyTheory/Random.pm  view on Meta::CPAN

			my $animal = real_animal( $redstring );
			my $group  = shady_group( $redstring );
			"the $animal is a fake animal, engineered by $group";
		},
		sub {
			my $chemicals = chemicals( $redstring );
			my $animal    = real_animal( $redstring );
			my $s         = ($animal ne 'fish') ? 's' : '';
			my $attribute = attribute( $redstring );
			"the $chemicals in the water is turning the $animal$s $attribute";
		},
		sub {
			my $chemicals = chemicals( $redstring );
			my $food      = food( $redstring );
			"$food are full of $chemicals";
		},
		sub {
			my $animal = real_animal( $redstring );
			"the $animal originally comes from another planet";
		},
		sub {
			my $animal = real_animal( $redstring );
			my $group  = shady_group( $redstring );
			my $stupid = _RANDOM_(
				'people in costumes',
				'animatronics',
				'CGI',
				'highly coordinated swarms of bees',
				'holograms',
				'a mirage',
			);
			"the $animal is a fake animal and is just $stupid";
		},
		sub {
			my $animal = fake_animal( $redstring );
			"the $animal is a real animal";
		},
		sub {
			my $time = future_time( $redstring );
			"the world will end $time";
		},
		sub {
			my $time = future_time( $redstring );
			$redstring->{topic} = { name => 'comets', plural => 1 };
			"the comet will hit us $time";
		},
		sub {
			my $place = random_place( $redstring );
			$redstring->{topic} = { name => 'flooding', plural => 1 };
			"$place was destroyed by floods";
		},
		sub {
			my $place = random_place( $redstring );
			my $group = $redstring->{shady_group}{name} // shady_group( $redstring );
			$redstring->{topic} = { name => 'coup d\'etats', plural => 1 };
			"$place is ruled by $group";
		},
		sub {
			my $time = future_time( $redstring );
			$redstring->{topic} = { name => 'zombies', plural => 1 };
			"the zombie apocalypse will start $time";
		},
		sub {
			my $time = future_time( $redstring );
			$redstring->{topic} = { name => 'Jesus', plural => 0 };
			"Jesus will return $time";
		},
		sub {
			my $mc    = mind_control_device( $redstring );
			my $group = $redstring->{shady_group}{name} // shady_group( $redstring );
			"THEY ($group) are using $mc";
		},
		sub {
			my $victim = victim( $redstring );
			my $place  = bad_place( $redstring );
			"$victim is alive and kept at $place";
		},
		sub {
			my $artifact = artifact( $redstring );
			my $p = random_place( $redstring );
			"$artifact is in $p";
		},
		sub {
			my $victim = victim( $redstring );
			$redstring->{topic} = { name => 'the antichrist', plural => 0 };
			"$victim was the antichrist";
		},
		sub {
			my $victim = victim( $redstring );
			"$victim was a time-traveller";
		},
		sub {
			my $victim = victim( $redstring );
			"$victim was an inter-dimensional being";
		},
		sub {
			my $chem = chemicals( $redstring );
			my $stupid = _RANDOM_(
				'water mixed with food-colouring',
				'water that they put in the microwave',
				'water that came from a goat\'s insides',
				'water that they used magic on',
				'made of fairy dust',
				'melted potato starch',
			);
			"$chem is really just $stupid";
		},
		sub {
			my $fiction = fiction( $redstring );
			"$fiction is historically accurate";
		},
		sub {
			my $fiction = fiction( $redstring );
			my $victim = $redstring->{victim} // victim( $redstring );
			"$fiction was really written by $victim";
		},
		sub {
			my $p = random_place( $redstring );
			my $extinct = _RANDOM_(
				'dinosaur',
				'mammoth',



( run in 2.463 seconds using v1.01-cache-2.11-cpan-5a3173703d6 )