Algorithm-SixDegrees

 view release on metacpan or  search on metacpan

lib/Algorithm/SixDegrees.pm  view on Meta::CPAN

L<http://rt.cpan.org>.  I will be notified, and then you'll automatically
be notified of progress on your bug as I make changes.

=head1 ACKNOWLEDGEMENTS

Thank you to Slaven Rezić and Peter John Acklam for bug reports.
Apologies it took so long to see and fix them. (So much for
notifications...)

Andy Lester and Ricardo Signes wrote Module::Starter, which helped
get the framework up and running fairly quickly.

Brad Fitzpatrick of L<http://livejournal.com> for giving me access
to a LiveJournal interface to determine linking information on that
site, which enabled me to write the algorithm that has been reduced
into this module.

=head1 COPYRIGHT & LICENSE

Copyright 2005-2020 Peter Krawczyk, All Rights Reserved.

samples/ljc.pl  view on Meta::CPAN

ljc.pl - A sample script to link LiveJournal users

=head1 SYNOPSIS

  # Link "ljuser1" to "ljuser2"
  ./ljc.pl ljuser1 ljuser2

=head1 DESCRIPTION

This sample script uses the popular weblog site LiveJournal
L<http://www.livejournal.com> and creates the necessary framework
for C<Algorithm::SixDegrees> to link users together into a chain.

=head1 FINDING USERS

Before running the script for the first time, please read
L<http://www.livejournal.com/bots/>.  In short, you will need to
change the C<$agent> variable; it must contain your email address.

Also, if you intend to run this more than a couple times, please
implement some form of results caching.  It could be as simple as

samples/movie.pl  view on Meta::CPAN

#!/usr/bin/perl -Tw

=head1 NAME

movie.pl - A sample script to link actors through movies

=head1 DESCRIPTION

This sample script takes a database full of actors and movies,
and creates the necessary framework for C<Algorithm::SixDegrees>
to link the actors through the movies.

The data source (and thus the script) expects the last name first.
In other words, you can play "Six Degrees of Bacon, Kevin" with this.

=head1 FINDING ACTORS

If an actor is not found, the script searches the data source, using
the input as the starting string.  If it finds only one match, it
uses that instead.  For example, in my data source, Johnny Carson



( run in 0.894 second using v1.01-cache-2.11-cpan-df04353d9ac )