Acme-CPANAuthors-MBTI
view release on metacpan or search on metacpan
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The license agreements of most software companies try to keep users
at the mercy of those companies. By contrast, our General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. The
General Public License applies to the Free Software Foundation's
software and to any other program whose authors commit to using it.
You can use it for your programs, too.
When we speak of free software, we are referring to freedom, not
price. Specifically, the General Public License is designed to make
sure that you have the freedom to give away or sell copies of free
software, that you receive source code or can get it if you want it,
that you can change the software or use pieces of it in new free
programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
For example, if you distribute copies of a such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must tell them their rights.
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License Agreement applies to any program or other work which
contains a notice placed by the copyright holder saying it may be
distributed under the terms of this General Public License. The
Each version is given a distinguishing version number. If the Program
specifies a version number of the license which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
the license, you may choose any version ever published by the Free Software
Foundation.
8. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
NO WARRANTY
9. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
possible use to humanity, the best way to achieve this is to make it
free software which everyone can redistribute and change under these
terms.
To do so, attach the following notices to the program. It is safest to
attach them to the start of each source file to most effectively convey
the exclusion of warranty; and each file should have at least the
"copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) 19yy <name of author>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 1, or (at your option)
any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) 19xx name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the
appropriate parts of the General Public License. Of course, the
commands you use may be called something other than `show w' and `show
c'; they could even be mouse-clicks or menu items--whatever suits your
program.
.mailmap
.perltidyrc
.travis.yml
Changes
LICENSE
MANIFEST
META.json
META.yml
Makefile.PL
README
authorlists/ENFJ.txt
authorlists/ENFP.txt
authorlists/ENTJ.txt
authorlists/ENTP.txt
authorlists/ESFJ.txt
authorlists/ESFP.txt
authorlists/ESTJ.txt
authorlists/ESTP.txt
authorlists/INFJ.txt
authorlists/INFP.txt
authorlists/INTJ.txt
authorlists/INTP.txt
authorlists/ISFJ.txt
authorlists/ISFP.txt
authorlists/ISTJ.txt
authorlists/ISTP.txt
dist.ini
dist.ini.meta
inc/expand_author_list.pm
lib/Acme/CPANAuthors/MBTI.pm
lib/Acme/CPANAuthors/MBTI/INTP.pm
maint/perlcritic.rc.gen.pl
maint/travisci.pl
misc/Changes.deps
misc/Changes.deps.all
misc/Changes.deps.dev
misc/Changes.deps.opt
misc/built_with.json
misc/perlcritic.deps
perlcritic.rc
t/00-compile/lib_Acme_CPANAuthors_MBTI_INTP_pm.t
t/00-compile/lib_Acme_CPANAuthors_MBTI_pm.t
t/00-report-prereqs.dd
t/00-report-prereqs.t
weaver.ini
xt/author/critic.t
xt/author/eol.t
xt/author/pod-coverage.t
xt/author/pod-syntax.t
xt/release/cpan-changes.t
xt/release/distmeta.t
xt/release/kwalitee.t
xt/release/minimum-version.t
{
"abstract" : "CPAN Authors by MBTI Type",
"author" : [
"Kent Fredric <kentnl@cpan.org>"
],
"dynamic_config" : 0,
"generated_by" : "Dist::Zilla version 6.009, CPAN::Meta::Converter version 2.150010",
"license" : [
"perl_5"
],
"meta-spec" : {
"url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec",
"version" : 2
}
},
"name" : "@Author::KENTNL/MetaData::BuiltWith",
"version" : "1.004005"
},
{
"class" : "Dist::Zilla::Plugin::Git::Contributors",
"config" : {
"Dist::Zilla::Plugin::Git::Contributors" : {
"git --version" : "2.11.1",
"include_authors" : 0,
"include_releaser" : 0,
"order_by" : "name",
"paths" : []
}
},
"name" : "@Author::KENTNL/Git::Contributors",
"version" : "0.029"
},
{
"class" : "Dist::Zilla::Plugin::Git::GatherDir",
"skiptest" : []
}
},
"name" : "@Author::KENTNL/Test::Kwalitee",
"version" : "2.12"
},
{
"class" : "Dist::Zilla::Plugin::Test::EOL",
"config" : {
"Dist::Zilla::Plugin::Test::EOL" : {
"filename" : "xt/author/eol.t",
"finder" : [
":ExecFiles",
":InstallModules",
":TestFiles"
],
"trailing_whitespace" : 1
}
},
"name" : "@Author::KENTNL/Test::EOL",
"version" : "0.19"
}
],
"zilla" : {
"class" : "Dist::Zilla::Dist::Builder",
"config" : {
"is_trial" : 0
},
"version" : "6.009"
}
},
"x_authority" : "cpan:KENTNL",
"x_serialization_backend" : "Cpanel::JSON::XS version 3.0227"
}
---
abstract: 'CPAN Authors by MBTI Type'
author:
- 'Kent Fredric <kentnl@cpan.org>'
build_requires:
ExtUtils::MakeMaker: '0'
File::Spec: '0'
Test::More: '0'
configure_requires:
ExtUtils::MakeMaker: '0'
dynamic_config: 0
generated_by: 'Dist::Zilla version 6.009, CPAN::Meta::Converter version 2.150010'
license: perl
X[0..50] is "Y", that does not mean you can take X[1] and assert Y.
However, knowing X[1] is between X[0] and X[50] you can conjecture their
odds at being relative to the demographic average Y.
Thus, one can conjecture what one *might* do in a slightly better manner
than enumerating all possible behaviours observed in humans.
Blah blah blah more ranting here.
Creds to "ETHER" <https://metacpan.org/author/ETHER> for the original
entry I stole all the things from and refactored them to death,
Acme::CPANAuthors::Nonhuman
Subsequently, my source file is a lot smaller and needs about 3
variables modifed to make a new type.
So just change the files in "/authorlists"
INSTALLATION
This is a Perl module distribution. It should be installed with whichever
tool you use to manage your installation of Perl, e.g. any of
cpanm .
cpan .
cpanp -i .
; This file is generated from dist.ini.meta by dzil bakeini.
; Edit that file or the bundles contained within for long-term changes.
; Generated by Dist::Zilla::Plugin::Author::KENTNL::DistINI version 2.022002 at Fri Dec 26 01:43:01 2014
; vim: syntax=dosini
; Uncomment this to bootstrap via self
; [Bootstrap::lib]
name = Acme-CPANAuthors-MBTI
author = Kent Fredric <kentnl@cpan.org>
license = Perl_5
copyright_holder = Kent Fredric <kentfredric@gmail.com>
[MungeFile::WithDataSection]
:version = 0.003
finder = :InstallModules
[MetaConfig / @Author::KENTNL/MetaConfig]
[GithubMeta / @Author::KENTNL/GithubMeta]
[MetaData::BuiltWith / @Author::KENTNL/MetaData::BuiltWith]
:version = 1.004000
show_config = 1
show_uname = 1
uname_args = -s -o -r -m -i
use_external_file = only
[Git::Contributors / @Author::KENTNL/Git::Contributors]
:version = 0.006
include_authors = 0
include_releaser = 0
order_by = name
[Git::GatherDir / @Author::KENTNL/Git::GatherDir]
exclude_filename = README
exclude_filename = README.mkdn
exclude_filename = README.pod
exclude_filename = LICENSE
include_dotfiles = 1
[Prereqs / @Author::KENTNL/BundleDevelSuggests]
-phase = develop
-type = suggests
Dist::Zilla::App::Command::bakeini = 0.001000
Dist::Zilla::PluginBundle::Author::KENTNL = 2.025021
[Prereqs::AuthorDeps / @Author::KENTNL/Prereqs::AuthorDeps]
[Authority / @Author::KENTNL/Authority]
:version = 1.006
authority = cpan:KENTNL
do_metadata = 1
locate_comment = 1
[MakeMaker / @Author::KENTNL/MakeMaker]
default_jobs = 10
[Author::KENTNL::RecommendFixes / @Author::KENTNL/Author::KENTNL::RecommendFixes]
:version = 0.004002
[Readme::Brief / @Author::KENTNL/ShippedReadme]
Dist::Zilla::Plugin::Test::EOL = 0
Dist::Zilla::Plugin::Test::Kwalitee = 0
Dist::Zilla::Plugin::Test::MinimumVersion = 0
Dist::Zilla::Plugin::Test::Perl::Critic = 0
Dist::Zilla::Plugin::Test::ReportPrereqs = 0
Dist::Zilla::Plugin::TestRelease = 0
Dist::Zilla::Plugin::Twitter = 0
Dist::Zilla::Plugin::UploadToCPAN = 0
[Prereqs]
; authordep HTTP::Tiny = 0
; authordep Parse::CPAN::Whois = 0
; authordep Acme::CPANAuthors::Factory = 0
; authordep JSON::MaybeXS = 1.001000
; authordep Path::Tiny = 0
; authordep HTML::Entities = 0
; authordep Math::Random::MT = 0
Acme::CPANAuthors = 0.24
perl = 5.008
[Prereqs / DevelopRequires]
perl = 5.014000
dist.ini.meta view on Meta::CPAN
; Generated by Dist::Zilla::Plugin::Author::KENTNL::DistINI version 2.022002 at Fri Dec 26 01:43:01 2014
; vim: syntax=dosini
name = Acme-CPANAuthors-MBTI
author = Kent Fredric <kentnl@cpan.org>
license = Perl_5
copyright_holder = Kent Fredric <kentfredric@gmail.com>
; Uncomment this to bootstrap via self
; [Bootstrap::lib]
[MungeFile::WithDataSection]
:version = 0.003
finder = :InstallModules
dist.ini.meta view on Meta::CPAN
toolkit = eumm
toolkit_hardness = soft
bumpversions = 1
copyfiles = LICENSE
srcreadme = mkdn
twitter_extra_hash_tags = #mbti
-remove = MinimumPerl
; auto_prereqs_skip = File::Find
[Prereqs]
Acme::CPANAuthors = 0.24 ; For parent group with no ->authors
perl = 5.008
; authordep HTTP::Tiny = 0
; authordep Parse::CPAN::Whois = 0
; authordep Acme::CPANAuthors::Factory = 0
; authordep JSON::MaybeXS = 1.001000
; authordep Path::Tiny = 0
; authordep HTML::Entities = 0
; authordep Math::Random::MT = 0
[Prereqs / DevelopRequires]
perl = 5.014000 ; /r modifier
inc/expand_author_list.pm view on Meta::CPAN
use 5.014; # /r modifier
use strict;
use warnings;
package expand_author_list;
# ABSTRACT: Expand a DATA section into a CPAN Authors list
# AUTHORITY
use HTTP::Tiny;
use Parse::CPAN::Whois;
use Acme::CPANAuthors::Factory;
use JSON::MaybeXS 1.001000;
use Path::Tiny qw(path);
inc/expand_author_list.pm view on Meta::CPAN
sub rng {
return state $rng = Math::Random::MT->new( map { unpack 'L', $_ } q[Kent], q[ is ], q[a du], q[ll b], q[oy ] );
}
sub dolog { *STDERR->print("[32m$_[0][0m\n") }
sub mirror_whois {
my ($filename) = @_;
my $out = tempdir()->child($filename);
dolog("Fetching $filename to $out");
my $response = http()->mirror( 'http://www.cpan.org/authors/' . $filename, $out );
die "failed to fetch $filename: $response->{status} $response->{reason}\n"
if not $response->{success} and $response->{status} ne '304';
return "$out";
}
sub get_gravatar_url {
my ($authorid) = @_;
dolog("Resolving Gravatar for $authorid");
my $request = http()->get( 'http://api.metacpan.org/v0/author/' . $authorid ) // {};
my $content = $request->{content} // {};
my $json = json()->decode($content);
my $url = $json->{gravatar_url};
$url =~ s/s=\K130/80/g;
return $url;
}
sub extract_data {
state $result_cache = {};
my ( $category, $source_file ) = @_;
return $result_cache->{$category} if exists $result_cache->{$category};
my $author_data = Parse::CPAN::Whois->new( mirror_whois('00whois.xml') );
my $author_hash = {};
my @authors;
for my $id ( path($source_file)->lines_raw( { chomp => 1 } ) ) {
dolog("$category / $id");
my $name = $author_data->author($id)->name;
$author_hash->{$id} = $name;
push @authors,
{
id => $id,
name => $name,
avatar => get_gravatar_url($id),
};
}
my $author_db = Acme::CPANAuthors::Factory->create( $category . '_temp' => $author_hash );
for my $author (@authors) {
$author->{dists} = $author_db->distributions( $author->{id} ) // 0;
}
return ( $result_cache->{$category} = [ sort { $b->{dists} <=> $a->{dists} || $a->{id} cmp $b->{id} } @authors ] );
}
sub authors_to_code {
my (%config) = ref $_[0] ? %{ $_[0] } : @_;
my $plugin = $config{plugin};
my $plugin_name = $config{plugin_name} // ref $config{plugin};
my $plugin_version = $config{plugin_version} // $plugin_name->VERSION;
my $category = $config{category};
my $authors = '';
my $avatar_urls = '';
for my $author ( @{ $config{data} } ) {
$authors .= " $author->{id} => '$author->{name}',\n";
$avatar_urls .= " $author->{id} => '$author->{avatar}',\n";
}
my @display_authors = map { $config{data}->[ rng->irand() % scalar @{ $config{data} } ] } 1;
return <<"EOF";
# Code inserted by inc/expand_author_list#authors_to_code
# by $plugin_name $plugin_version
## no critic (ValuesAndExpressions::RestrictLongStrings)
my \%authors = (
$authors);
my \%avatar_urls = (
$avatar_urls);
## use critic
=method authors
my \$scalar_ref = Acme::CPANAuthors::${category}\->authors;
my \%hash = Acme::CPANAuthors::${category}\->authors;
=cut
sub authors { return ( wantarray ? \%authors : \\\%authors ) }
=method category
my \$scalar = Acme::CPANAuthors::${category}\->category;
=cut
sub category { return '$category' }
=method avatar_url
my \$url = Acme::CPANAuthors::${category}\->avatar_url('$display_authors[0]->{id}');
=cut
sub avatar_url {
my ( \$id ) = \@_;
return \$avatar_urls{\$id};
}
# end generated code
EOF
}
sub authors_to_avatars {
my (%config) = ref $_[0] ? %{ $_[0] } : @_;
my $plugin = $config{plugin};
my $plugin_name = $config{plugin_name} // ref $config{plugin};
my $plugin_version = $config{plugin_version} // $plugin_name->VERSION;
my @lines;
for my $author ( @{ $config{data} } ) {
my $name = encode_entities( $author->{name} );
my $title = "$author->{id} ($name), $author->{dists} distribution" . ( $author->{dists} != 1 ? 's' : '' );
push @lines,
qq{<a href="http://metacpan.org/author/$author->{id}">}
. q{<span>}
. q{<img style="margin: 0 5px 5px 0;" width="80" height="80" }
. qq{src="$author->{avatar}" alt="$author->{id}" title="$title" />}
. q{</span>} . q{</a>};
}
my $content = join( "<!--\n-->", @lines );
return <<"EOF";
<div style="text-align:center;padding:0px!important;overflow-y:hidden;
margin-left: auto; margin-right: auto; max-width: 430px">
<!-- Data inserted by inc/expand_author_list#authors_to_avatars
by $plugin_name $plugin_version -->
$content
</div>
EOF
}
sub mbti_type {
my ($type) = @_;
return <<"EOF";
inc/expand_author_list.pm view on Meta::CPAN
=item * L<< C<$type> on Wikipedia|https://en.wikipedia.org/wiki/$type >>
=back
EOF
}
sub mbti_description {
my (%config) = ref $_[0] ? %{ $_[0] } : @_;
my $html = authors_to_avatars( \%config );
my $description = mbti_description_text( $config{type} );
my $link = mbti_type( $config{type} );
return <<"EOF";
This class provides a hash of PAUSE ID's and names of authors
who have identified themselves as $link
=begin html
$html
=end html
$description
inc/expand_author_list.pm view on Meta::CPAN
}
sub generate_synopsis {
my (%config) = ref $_[0] ? %{ $_[0] } : @_;
my $plugin = $config{plugin};
my $plugin_name = $config{plugin_name} // ref $config{plugin};
my $plugin_version = $config{plugin_version} // $plugin_name->VERSION;
my @items = @{ $config{'data'} };
my @authors = map { $items[ rng->irand() % scalar @items ] } 1 .. 3;
return ( <<"EOF" =~ s/^(\S)/ $1/msgr );
use Acme::CPANAuthors;
use Acme::CPANAuthors::$config{category};
# Or just use Acme::CPANAuthors::MBTI
my \$authors = Acme::CPANAuthors->new('$config{category}');
my \$number = \$authors->count;
my \@ids = \$authors->id;
my \@distros = \$authors->distributions('$authors[0]->{id}');
my \$url = \$authors->avatar_url('$authors[1]->{id}');
my \$kwalitee = \$authors->kwalitee('$authors[2]->{id}');
my \%authorshash = Acme::CPANAuthors::$config{category}\->authors;
my \$authorshashref = Acme::CPANAuthors::$config{category}\->authors;
my \$category = Acme::CPANAuthors::$config{category}\->category;
EOF
}
1;
lib/Acme/CPANAuthors/MBTI.pm view on Meta::CPAN
that does not mean you can take X[1] and assert Y.
However, knowing X[1] is between X[0] and X[50] you can conjecture their odds
at being relative to the demographic average Y.
Thus, one can conjecture what one I<might> do in a slightly better manner than enumerating
all possible behaviours observed in humans.
Blah blah blah more ranting here.
Creds to L<< C<ETHER>|https://metacpan.org/author/ETHER >> for the original entry I stole
all the things from and refactored them to death, L<Acme::CPANAuthors::Nonhuman>
Subsequently, my source file is a lot smaller and needs about 3 variables modifed to make a new type.
So just change the files in C</authorlists>
=head1 AUTHOR
Kent Fredric <kentnl@cpan.org>
=head1 COPYRIGHT AND LICENSE
This software is copyright (c) 2017 by Kent Fredric <kentfredric@gmail.com>.
This is free software; you can redistribute it and/or modify it under
lib/Acme/CPANAuthors/MBTI/INTP.pm view on Meta::CPAN
use utf8;
package Acme::CPANAuthors::MBTI::INTP;
# ABSTRACT: The TiNe CPAN Authors
our $AUTHORITY = 'cpan:KENTNL'; # AUTHORITY
our $VERSION = '0.001002';
#<<<
# Code inserted by inc/expand_author_list#authors_to_code
# by Dist::Zilla::Plugin::MungeFile::WithDataSection 0.009
## no critic (ValuesAndExpressions::RestrictLongStrings)
my %authors = (
KENTNL => 'Kent Fredric',
);
my %avatar_urls = (
KENTNL => 'https://secure.gravatar.com/avatar/4b96677ae9ecbe76b8c33ead244f7407?s=80&d=http%3A%2F%2Fwww.gravatar.com%2Favatar%2F4b96677ae9ecbe76b8c33ead244f7407%3Fs%3D130%26d%3Didenticon',
);
## use critic
sub authors { return ( wantarray ? %authors : \%authors ) }
sub category { return 'MBTI::INTP' }
lib/Acme/CPANAuthors/MBTI/INTP.pm view on Meta::CPAN
=head1 VERSION
version 0.001002
=head1 SYNOPSIS
use Acme::CPANAuthors;
use Acme::CPANAuthors::MBTI::INTP;
# Or just use Acme::CPANAuthors::MBTI
my $authors = Acme::CPANAuthors->new('MBTI::INTP');
my $number = $authors->count;
my @ids = $authors->id;
my @distros = $authors->distributions('KENTNL');
my $url = $authors->avatar_url('KENTNL');
my $kwalitee = $authors->kwalitee('KENTNL');
my %authorshash = Acme::CPANAuthors::MBTI::INTP->authors;
my $authorshashref = Acme::CPANAuthors::MBTI::INTP->authors;
my $category = Acme::CPANAuthors::MBTI::INTP->category;
=head1 DESCRIPTION
This class provides a hash of PAUSE ID's and names of authors
who have identified themselves as L<< C<INTP>|https://en.wikipedia.org/wiki/INTP >>
=head1 METHODS
=head2 authors
my $scalar_ref = Acme::CPANAuthors::MBTI::INTP->authors;
my %hash = Acme::CPANAuthors::MBTI::INTP->authors;
=head2 category
my $scalar = Acme::CPANAuthors::MBTI::INTP->category;
=head2 avatar_url
my $url = Acme::CPANAuthors::MBTI::INTP->avatar_url('KENTNL');
=for html <div style="text-align:center;padding:0px!important;overflow-y:hidden;
margin-left: auto; margin-right: auto; max-width: 430px">
<!-- Data inserted by inc/expand_author_list#authors_to_avatars
by Dist::Zilla::Plugin::MungeFile::WithDataSection 0.009 -->
<a href="http://metacpan.org/author/KENTNL"><span><img style="margin: 0 5px 5px 0;" width="80" height="80" src="https://secure.gravatar.com/avatar/4b96677ae9ecbe76b8c33ead244f7407?s=80&d=http%3A%2F%2Fwww.gravatar.com%2Favatar%2F4b96677ae9ecbe76b8c33e...
</div>
For more details see L<< C<Acme::CPANAuthors::MBTI>|Acme::CPANAuthors::MBTI >>.
=over 4
=item * L<< C<INTP> on personalitypage.com|http://personalitypage.com/INTP.html >>
=item * L<< C<INTP> on typelogic.com|http://typelogic.com/intp.html >>
( run in 1.811 second using v1.01-cache-2.11-cpan-5c0b1e786e0 )