<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">NAME
    Text::Karma - Process (and optionally store) karma points

SYNOPSIS
     use 5.010;
     use strict;
     use warnings;
     use Text::Karma;
     use DBI;

     my $dbh = DBI-&gt;connect("dbi:SQLite:dbname=karma.sqlite","","");
     my $karma = Text::Karma(dbh =&gt; $dbh);

     $karma-&gt;process_karma(
         nick  =&gt; 'someone',
         who   =&gt; 'someone!from@somewhere',
         where =&gt; '#in_here',
         str   =&gt; "this thing++ is awesome # some cool comment",
     );

     say "Karma for thing: ".$karma-&gt;get_karma("thing");

METHODS
  "new"
    Constructs and returns a Text::Karma object. Takes the following
    arguments:

    'dbh', an optional database handle.

    'table_prefix', a prefix to use for the table that will be created if
    you supplied a database handle.

  "process_karma"
    Processes karma from a string, and returns the results. They will also
    be stored in the database if you supplied a database handle to "new".
    Takes the following arguments:

    'nick', the nickname of the person who wrote the text. Required.

    'who', the full name of the person who wrote the text. Required.

    'where', the place where the person wrote the text. Required.

    'str', the text that the person wrote. Required.

    'self_karma', whether to allow people to affect their own karma.
    Optional. Defaults to false.

  "get_karma"
    This method returns the karma for a given subject from the database.
    Takes one argument, a subject to look up. If the subject is unknown,
    nothing is returns. Otherwise, you'll get a hashref with the following
    keys:

    'up', number of karma upvotes for the subject.

    'down', number of karma downvotes for the subject.

    'score', the karma score for the subject ('up' minus 'down').

AUTHOR
    Hinrik Ă–rn SigurĂ°sson &lt;hinrik.sig@gmail.com&gt;

    Apocalypse &lt;APOCAL@cpan.org&gt;

CONTACT
  Email
    You can email the authors of this module at &lt;APOCAL@cpan.org&gt; or
    "hinrik.sig@gmail.com" asking for help with any problems you have.

  Internet Relay Chat
    You can get live help by using IRC (Internet Relay Chat). If you don't
    know what IRC is, please read this excellent guide:
    &lt;http://en.wikipedia.org/wiki/Internet_Relay_Chat&gt;. Please be courteous
    and patient when talking to us, as we might be busy or sleeping! You can
    join the following networks/channels and get help:

    *   MAGnet

        You can connect to the server at 'irc.perl.org', join the
        "#perl-help" channel, and talk to ""Apocalypse&gt; or "Hinrik"

    *   FreeNode

        You can connect to the server at 'irc.freenode.net', join the
        "#perl" channel, and talk to ""Apocal&gt; or "literal"

    *   EFnet

        You can connect to the server at 'irc.efnet.org', join the "#perl"
        channel, and talk to ""Ap0cal&gt; or "Hinrik"

LICENSE AND COPYRIGHT
    Copyright 2011 Hinrik Ă–rn SigurĂ°sson and Apocalypse

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

</pre></body></html>