Foorum

 view release on metacpan or  search on metacpan

docs/Tutorial2.html  view on Meta::CPAN

<html>
<head>
<title>Tutorial2</title>
<link type="text/css" rel="stylesheet" href="static/d_20071112.css" />
<!--[if IE]>
<link type="text/css" rel="stylesheet" href="static/d_ie.css" />
<![endif]--> 
</head>
<body class="t6">
<div id="wikicontent">
<h1> NAME </h1><p>Foorum::Manual::Tutorial2 - Tutorial 2: Dive into Foorum: TheSchwartz</p><h2> TheSchwartz introduction </h2><p><a href="http://search.cpan.org/perldoc?TheSchwartz" rel="nofollow">TheSchwartz</a></p><p>As CPAN perldoc says: reliable ...
    # check if there is any new TODO task in one table of theschwartz database.
    if ($has_new_task) { # scalar @new_tasks
        foreach my $new_task (@new_tasks) {
            $new_task-&gt;worker();
        }
    }
    sleep 5;
</pre><p>Where does new task from? Foorum has two ways, always one is form Foorum/Controller|Model, the other is from cron scripts.</p><p>example code:</p><ol><li>in Foorum/Model </li></ol><pre class="prettyprint">use Foorum::ExternalUtils qw/theschw...
my $client = theschwartz();
$client-&gt;insert(
    'Foorum::TheSchwartz::Worker::WorkerExample',
    @args
);
</pre><ol><li>in cron script. <a href="http://foorum.googlecode.com/svn/trunk/bin/cron/TheSchwartz_client.pl" rel="nofollow">http://foorum.googlecode.com/svn/trunk/bin/cron/TheSchwartz_client.pl</a> </li></ol><p>That's a simple introduction. Maybe I'...
</div>
<h1>WHERE TO GO NEXT</h1>
<ul>
<li>Get the lastest version from <a href="http://code.google.com/p/foorum/wiki/Tutorial2">http://code.google.com/p/foorum/wiki/Tutorial2</a></li>
<li><a href="index.html">Index Page</a></li>
</ul>
<script src="static/prettify.js"></script>
<script>
 prettyPrint();
</script>
</body>
</html>



( run in 2.606 seconds using v1.01-cache-2.11-cpan-75ffa21a3d4 )