Acme-ConspiracyTheory-Random
view release on metacpan or search on metacpan
lib/Acme/ConspiracyTheory/Random.pm view on Meta::CPAN
if ( my $d = $redstring->{disease} ) {
push @x, (
"patients with $d keep disappearing from hospitals",
"patients with $d are being silenced by the government",
"doctors working on $d are being killed",
"$d probably isn't even a real disease",
"nobody has ever died of $d",
);
}
if ( my $f = $redstring->{food} ) {
push @x, (
"$f don't taste like they used to",
"$f smell funny",
"$f make me feel sick",
"I don't like $f",
);
}
if ( my $chem = $redstring->{chemicals} ) {
push @x, (
"$chem isn't on the periodic table",
"$chem isn't real",
"$chem isn't natural",
"you'd have to be stupid to think $chem is real",
);
}
if ( my $r = $redstring->{precious_resource} ) {
my ( $bad, $are, $r_are );
$redstring->{shady_group}{name} or shady_group( $redstring );
foreach ( qw/ antagonist protagonist shady_group / ) {
if ( $redstring->{$_}{name} ) {
$bad = $redstring->{$_}{name};
$are = $redstring->{$_}{plural} ? 'are' : 'is';
$r_are = ($r =~ /s$/) ? 'are' : 'is';
}
}
push @x, (
"the Wikipedia entry for $r keeps getting edited by $bad",
"$bad keeps buying $r secretly on the stock market",
"the global supply of $r is at an all time low",
"have you ever seen $r for real with your own eyes",
"$r $r_are so damn expensive",
"$r $r_are really rare",
"Alex Jones says $bad $are linked to $r",
);
}
if ( my $topic = $redstring->{topic} ) {
my $topicname = $topic->{name};
my $have = $topic->{plural} ? 'have' : 'has';
push @x, (
"there's hidden clues in the Wikipedia page about $topicname",
"THEY let it slip during an edit war in a Wikipedia page about $topicname",
"Bible numerology has clues about $topicname",
"the Voynich manuscript has clues about $topicname",
"$topicname $have always been suspicious",
"$topicname $have connections to THEM",
"nobody really understands $topicname",
"all my posts about $topicname keep getting taken down by Tumblr",
);
}
if ( my $p = $redstring->{random_place} // $redstring->{bad_place} ) {
my $bad = $redstring->{antagonist}{name}
// $redstring->{protagonist}{name}
// $redstring->{shady_group}{name}
// shady_group( $redstring );
push @x, (
"the Wikipedia entry for $p keeps getting edited by $bad",
# This has singular/plural problems - how to solve?
"$bad has ties to $p",
"$p probably isn't a real place anyway",
"$p isn't shown on any maps",
);
}
for my $actor ( qw/ protagonists antagonists / ) {
next unless $redstring->{$actor}{name};
my $name = $redstring->{$actor}{shortname} // $redstring->{$actor}{name};
my $have = splural( $redstring->{$actor} ) ? 'have' : 'has';
my $are = splural( $redstring->{$actor} ) ? 'are' : 'is';
my $s = splural( $redstring->{$actor} ) ? '' : 's';
my $ies = splural( $redstring->{$actor} ) ? 'y' : 'ies';
( my $fbname = $name ) =~ s/^the //i;
$fbname = _UCFIRST_ $fbname;
my $lies = lies();
push @x, (
"$name $have included it in their manifesto",
"$name $have been strangely quiet about it",
"$name $are always untrustworthy",
"$name $are controlling everything",
"if you Google for $name there's loads of info",
"the '$fbname Truth' Facebook page says so",
"the '$fbname Exposed' website says so",
"$name even admit$s it",
"$name den$ies it but that is $lies",
);
if ( my $animal = $redstring->{real_animal} // $redstring->{fake_animal} ) {
push @x, "$name $have a picture of the $animal on their Wikipedia entry";
}
if ( my $place = $redstring->{random_place} ) {
push @x, "$name $have a secret base in $place";
}
if ( my $topic = $redstring->{topic} ) {
my $topicname = $topic->{name};
push @x, (
"$name ${( $redstring->{$actor}{plural} ? \'keep' : \'keeps' )} editing the Wikipedia page about $topicname",
"$name $are known to have ties to $topicname",
"'$name' is almost an anagram of '$topicname'",
"'$name' is the Hebrew word for '$topicname'",
"'$name' is an anagram of '$topicname' (if you spell it wrong)",
);
lib/Acme/ConspiracyTheory/Random.pm view on Meta::CPAN
_UCFIRST_ _RANDOM_(
"$truth but nobody knows because $sheeple.",
"$truth but nobody believes me because $sheeple.",
"$truth but everybody ignores it because $sheeple.",
"$truth but people are blind because $sheeple.",
);
},
sub {
my $fiction = fiction( $redstring );
my $truth = hidden_truth( $redstring );
_UCFIRST_ _RANDOM_(
"$fiction has a hidden message that $truth.",
"$fiction is just an allegory which shows that $truth.",
sub {
my $group = shady_group( $redstring );
$redstring->{protagonists} //= $redstring->{shady_group};
"$fiction was analysed with a computer by $group and it revealed $truth.",
},
);
},
sub {
my $group = shady_group( $redstring );
$redstring->{protagonists} = $redstring->{shady_group};
my $knows = $redstring->{protagonists}->{plural} ? 'knows' : 'know';
my $theyve = $redstring->{protagonists}->{plural} ? "They've" : "It's";
my $is = $redstring->{protagonists}->{plural} ? 'are' : 'is';
my $group_shortname = $redstring->{protagonists}{shortname} // $group;
my $artifact = artifact( $redstring );
my $project = shady_project( $redstring );
my $place = any_place( $redstring );
my @parts = _UCFIRST_ _RANDOM_(
"$group $knows that the truth about $project is engraved on $artifact. $theyve been searching $place to find it.",
"$group found out that $artifact has the truth about $project engraved on it. $theyve been looking for it in $place.",
"$group $knows that $artifact holds the truth about $project. They are hiding it in $place.",
"$group $is searching $place for $artifact because it holds the truth about $project.",
);
my ( $group2, $group3 );
if ( _RANDOM_( 1, 2 ) == 1 ) {
$group2 = shady_group( $redstring );
$redstring->{antagonists} = $redstring->{shady_group};
my $tool = precious_resource_with_quantity( $redstring );
push @parts, _UCFIRST_ _RANDOM_(
"$tool is being used by $group2 to stop $group_shortname.",
"$group2 donated $tool to help $group_shortname.",
"$group2 used $tool to try to stop $group_shortname but it didn't work.",
);
}
if ( _RANDOM_( 1, 2 ) == 1 ) {
$group3 = shady_group( $redstring );
$redstring->{antagonists} //= $redstring->{shady_group};
my $web = website( $redstring );
push @parts, _UCFIRST_ _RANDOM_(
"$group3 hacked the $group_shortname $web account to track them through $place.",
"$group3 noticed $group_shortname used an IP address from $place to post on $web.",
"$group_shortname contacted $group3 on $web about $artifact.",
);
}
if ( $group2 and $group3 ) {
push @parts, _UCFIRST_ _RANDOM_(
"$group2 and $group3 are in contact with each other.",
"$group2 and $group3 hired the same planner for their Christmas party.",
"$group2 and $group3 are connected.",
"$group2 and $group3 are probably working together.",
);
}
return join q[ ], @parts;
},
sub {
my $group = shady_group( $redstring );
$redstring->{protagonists} = $redstring->{shady_group};
my $are = $redstring->{protagonists}->{plural} ? 'are' : 'is';
my $place = random_place( $redstring );
my $darklord = dark_lord( $redstring );
my $getting_kids = _RANDOM_(
'abducting orphan children',
'buying child slaves',
'cloning babies',
'growing babies in test tubes',
'breeding babies',
'buying kids from poor families',
'stealing babies',
sub {
$redstring->{topic} //= { name => 'adoption', plural => 0 };
'adopting babies';
},
sub {
$redstring->{topic} //= { name => 'adoption', plural => 0 };
'adopting kids';
},
);
my $sacrifice = _RANDOM_(
'sacrifice them',
'ritually sacrifice them',
'offer them',
'offer them as a blood sacrifice',
'offer them as brides',
'offer them as sex slaves',
'feed them',
'sell them',
'mass sacrifice them',
);
_UCFIRST_ "$group $are $getting_kids in $place to $sacrifice to $darklord.";
},
sub {
my $group = shady_group( $redstring );
$redstring->{protagonists} = $redstring->{shady_group};
my $have = $redstring->{protagonists}->{plural} ? 'have' : 'has';
my $are = $redstring->{protagonists}->{plural} ? 'are' : 'is';
lib/Acme/ConspiracyTheory/Random.pm view on Meta::CPAN
}
return '';
}
sub bad_punctuation {
my ( $string, $cancel ) = @_;
unless ( $cancel ) {
$string =~ s/ ([A-Za-z]) ([,!?]) / $1 . _RANDOM_( $2, " $2", " $2", " $2$2") /exg;
$string =~ s/ ([A-Za-z]) ([.]) / $1 . _RANDOM_($2, $2, " $2", " ", " $2$2$2") /exg;
$string =~ s/\!/_RANDOM_('!', '!', '!!', "!!!!")/ex;
}
return $string;
}
1;
__END__
=pod
=encoding utf-8
=head1 NAME
Acme::ConspiracyTheory::Random - random theories
=head1 SYNOPSIS
use feature 'say';
use Acme::ConspiracyTheory::Random -all;
say bad_punctuation( theory() );
=head1 DESCRIPTION
This module exports a function, C<< theory() >> which returns a string.
=for html <p><img src="https://raw.githubusercontent.com/tobyink/p5-acme-conspiracytheory-random/master/assets/pepe-silvia.jpeg" alt=""></p>
There is also a function C<< bad_punctuation >> which, given a string, might
make the punctuation worse.
=head1 BUGS
Please report any bugs to
L<https://github.com/tobyink/p5-acme-conspiracytheory-random/issues>.
=head1 SEE ALSO
REDACTED
=head1 AUTHOR
Toby Inkster E<lt>tobyink@cpan.orgE<gt>.
=head1 CONTRIBUTORS
Alex Jones discovered that there are secretly other people who have contributed
to this module but Toby Inkster is working with Microsoft and the Illuminati to
cover it up. I tried to blog about it but all my posts keep getting taken down
from Tumblr. There are hidden clues on L<GitHub|https://github.com/tobyink/p5-acme-conspiracytheory-random/graphs/contributors>.
You don't want to know how deep this rabbit hole goes!
=head1 COPYRIGHT AND LICENCE
This software is copyright (c) 2021 by Toby Inkster.
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.
=head1 DISCLAIMER OF WARRANTIES
THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED
WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
( run in 0.909 second using v1.01-cache-2.11-cpan-ceb78f64989 )