Author: ranger
Date: Wed May 10 08:12:32 2006
New Revision: 10
URL:
<http://svn.finkproject.org/websvn/listing.php?sc=1&rev=10&repname=user%3a+ranger>
Log:
more working stuff
Added:
trunk/phenomenon/index.html
trunk/phenomenon/lib/
trunk/phenomenon/lib/Apache/
trunk/phenomenon/lib/Apache/Reload.pm
trunk/phenomenon/lib/Phenomenon/ (with props)
trunk/phenomenon/lib/Phenomenon/Apache.pm
trunk/phenomenon/lib/Phenomenon/DB/
trunk/phenomenon/lib/Phenomenon/DB.pm
trunk/phenomenon/lib/Phenomenon/DB/Object.pm
trunk/phenomenon/lib/Phenomenon/Hit/
trunk/phenomenon/lib/Phenomenon/Hit.pm
trunk/phenomenon/lib/Phenomenon/Hit/Manager.pm
trunk/phenomenon/lib/Phenomenon/HitKeywordMap.pm
trunk/phenomenon/lib/Phenomenon/Keyword/
trunk/phenomenon/lib/Phenomenon/Keyword.pm
trunk/phenomenon/lib/Phenomenon/Keyword/Manager.pm
trunk/phenomenon/lib/Phenomenon/Util.pm
trunk/phenomenon/lib/Phenomenon/Visitor/
trunk/phenomenon/lib/Phenomenon/Visitor.pm
trunk/phenomenon/lib/Phenomenon/Visitor/Manager.pm
trunk/phenomenon/schema.sql
trunk/phenomenon/startup.pl
trunk/phenomenon/transparent.gif (with props)
Modified:
trunk/phenomenon/ (props changed)
trunk/phenomenon/js/phenomenon.js
Propchange: trunk/phenomenon/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Wed May 10 08:12:32 2006
@@ -1,0 +1,1 @@
+.*.swp
Added: trunk/phenomenon/index.html
URL:
<http://svn.finkproject.org/websvn/filedetails.php?path=/trunk/phenomenon/index.html&rev=10&repname=user%3a+ranger>
==============================================================================
--- trunk/phenomenon/index.html (added)
+++ trunk/phenomenon/index.html Wed May 10 08:12:32 2006
@@ -1,0 +1,55 @@
+<html>
+ <head>
+ <title>Foo</title>
+ <link rel="stylesheet" type="text/css" href="js/fvlogger/logger.css" />
+ <meta name="icbm" content="35.644188, -78.820358" />
+ <meta name="geo.position" content="35.644188, -78.820358" />
+ <meta name="geo.placename" content="Holly Springs, North carolina" />
+ <meta name="geo.country" content="US" />
+ <meta name="keywords" content="foo bar" />
+ </head>
+ <body>
+ <script type="text/javascript" src="js/fvlogger/logger.js"></script>
+ <a href="index.html">foo</a>
+
+ <div id="fvlogger">
+ <dl>
+ <dt>fvlogger</dt>
+ <dd class="all">
+ <a href="#fvlogger" onclick="showAll();"
+ title="show all">all</a>
+ </dd>
+ <dd class="debug">
+ <a href="#fvlogger" onclick="showDebug();"
+ title="show debug">debug</a>
+ </dd>
+ <dd class="info">
+ <a href="#fvlogger" onclick="showInfo();"
+ title="show info">info</a>
+ </dd>
+ <dd class="warn">
+ <a href="#fvlogger" onclick="showWarn();"
+ title="show warnings">warn</a>
+ </dd>
+ <dd class="error">
+ <a href="#fvlogger" onclick="showError();"
+ title="show errors">error</a>
+ </dd>
+ <dd class="fatal">
+ <a href="#fvlogger" onclick="showFatal();"
+ title="show fatals">fatal</a>
+ </dd>
+ <dd>
+ <a href="#fvlogger" onclick="eraseLog(true);"
+ title="erase">erase</a>
+ </dd>
+ </dl>
+ </div>
+
+ <span id="phenomenon"></span>
+ <script type="text/javascript" src="js/phenomenon.js"></script>
+ <script type="text/javascript"><!--
+ new Phenomenon().injectImg();
+ --></script>
+ </body>
+</html>
Modified: trunk/phenomenon/js/phenomenon.js
URL:
<http://svn.finkproject.org/websvn/diff.php?path=/trunk/phenomenon/js/phenomenon.js&rev=10&repname=user%3a+ranger>
==============================================================================
--- trunk/phenomenon/js/phenomenon.js (original)
+++ trunk/phenomenon/js/phenomenon.js Wed May 10 08:12:32 2006
@@ -1,34 +1,40 @@
+function log_debug(message) { if (debug) { debug(message) } }
+function log_info(message) { if (info) { info(message) } }
+function log_warn(message) { if (warn) { warn(message) } }
+function log_error(message) { if (error) { error(message) } }
+function log_fatal(message) { if (fatal) { fatal(message) } }
+
function Phenomenon(idname)
{
- info("Phenomenon() instantiated");
+ log_info("Phenomenon() instantiated");
if (!idname)
idname = "phenomenon";
this.injectImg = function()
{
- debug("injectImg called")
+ log_debug("injectImg called")
if (document.getElementById && document.getElementById(idname))
{
document.getElementById(idname).innerHTML =
this.getImg();
}
else
{
- error("couldn't find the stats element!");
+ log_error("couldn't find the stats element!");
}
}
this.getImg = function()
{
- debug("getImg() called");
+ log_debug("getImg() called");
var retArray = this.getData();
- var retval = "<img src=\"testimg.gif?" + serialize(retArray) +
"\" width=\"1\" height=\"1\" alt=\"\" />";
- info(retval);
+ var retval = "<img src=\"/phenomenon/image.gif?" +
serialize(retArray) + "\" width=\"1\" height=\"1\" alt=\"\" />";
+ log_info(retval);
return retval;
}
this.getData = function()
{
- debug("getData() called");
+ log_debug("getData() called");
var data = new Array();
var items = new Array(new PageInfo(), new BrowserInfo(), new
MetaInfo());
@@ -39,7 +45,7 @@
var itemAsArray = item.asArray();
var classname = getObjectClass(item);
- debug("class name = " + classname);
+ log_debug("class name = " + classname);
for (var key in itemAsArray)
{
@@ -148,19 +154,19 @@
if( typeof( window.innerWidth ) == 'number' )
{
- debug("non-IE");
+ log_debug("non-IE");
this.setWidth(window.innerWidth);
this.setHeight(window.innerHeight);
}
else if( document.documentElement && (
document.documentElement.clientWidth || document.documentElement.clientHeight )
)
{
- debug("IE 6+ in standards-compliant mode");
+ log_debug("IE 6+ in standards-compliant mode");
this.setWidth(document.documentElement.clientWidth);
this.setHeight(document.documentElement.clientHeight);
}
else if( document.body && ( document.body.clientWidth ||
document.body.clientHeight ) )
{
- debug("IE 4 compatible");
+ log_debug("IE 4 compatible");
this.setWidth(document.body.clientWidth);
this.setHeight(document.body.clientHeight);
}
Added: trunk/phenomenon/lib/Apache/Reload.pm
URL:
<http://svn.finkproject.org/websvn/filedetails.php?path=/trunk/phenomenon/lib/Apache/Reload.pm&rev=10&repname=user%3a+ranger>
==============================================================================
--- trunk/phenomenon/lib/Apache/Reload.pm (added)
+++ trunk/phenomenon/lib/Apache/Reload.pm Wed May 10 08:12:32 2006
@@ -1,0 +1,251 @@
+# $Id: Reload.pm,v 1.16 2001/04/22 18:09:59 matt Exp $
+
+package Apache::Reload;
+
+use strict;
+
+$Apache::Reload::VERSION = '0.07';
+
+use vars qw(%INCS %Stat $TouchTime %UndefFields);
+
+%Stat = ($INC{"Apache/Reload.pm"} => time);
+
+$TouchTime = time;
+
+sub import {
+ my $class = shift;
+ my ($package,$file) = (caller)[0,1];
+
+ $class->register_module($package, $file);
+}
+
+sub package_to_module {
+ my $package = shift;
+ $package =~ s/::/\//g;
+ $package .= ".pm";
+ return $package;
+}
+
+sub register_module {
+ my ($class, $package, $file) = @_;
+ my $module = package_to_module($package);
+
+ if ($file) {
+ $INCS{$module} = $file;
+ }
+ else {
+ $file = $INC{$module};
+ return unless $file;
+ $INCS{$module} = $file;
+ }
+
+ no strict 'refs';
+ if (%{"${package}::FIELDS"}) {
+ $UndefFields{$module} = "${package}::FIELDS";
+ }
+}
+
+sub handler {
+ my $r = shift;
+
+ my $DEBUG = ref($r) && (lc($r->dir_config("ReloadDebug") || '') eq 'on');
+
+ my $TouchFile = ref($r) && $r->dir_config("ReloadTouchFile");
+
+ my $TouchModules;
+
+ if ($TouchFile) {
+ warn "Checking mtime of $TouchFile\n" if $DEBUG;
+ my $touch_mtime = (stat($TouchFile))[9] || return 1;
+ return 1 unless $touch_mtime > $TouchTime;
+ $TouchTime = $touch_mtime;
+ my $sym = Apache->gensym;
+ open($sym, $TouchFile) || die "Can't open '$TouchFile': $!";
+ $TouchModules = <$sym>;
+ chomp $TouchModules;
+ }
+
+ if (ref($r) && (lc($r->dir_config("ReloadAll") || 'on') eq 'on')) {
+ *Apache::Reload::INCS = \%INC;
+ }
+ else {
+ *Apache::Reload::INCS = \%INCS;
+ my $ExtraList =
+ $TouchModules ||
+ (ref($r) && $r->dir_config("ReloadModules")) ||
+ '';
+ my @extra = split(/\s+/, $ExtraList);
+ foreach (@extra) {
+ if (/(.*)::\*$/) {
+ my $prefix = $1;
+ $prefix =~ s/::/\//g;
+ foreach my $match (keys %INC) {
+ if ($match =~ /^\Q$prefix\E/) {
+ $Apache::Reload::INCS{$match} = $INC{$match};
+ my $package = $match;
+ $package =~ s/\//::/g;
+ $package =~ s/\.pm$//;
+ no strict 'refs';
+# warn "checking for FIELDS on $package\n";
+ if (%{"${package}::FIELDS"}) {
+# warn "found fields in $package\n";
+ $UndefFields{$match} = "${package}::FIELDS";
+ }
+ }
+ }
+ }
+ else {
+ Apache::Reload->register_module($_);
+ }
+ }
+ }
+
+
+ while (my($key, $file) = each %Apache::Reload::INCS) {
+ local $^W;
+ warn "Apache::Reload: Checking mtime of $key\n" if $DEBUG;
+
+ my $mtime = (stat $file)[9];
+
+ unless (defined($mtime) && $mtime) {
+ for (@INC) {
+ $mtime = (stat "$_/$file")[9];
+ last if defined($mtime) && $mtime;
+ }
+ }
+
+ warn("Apache::Reload: Can't locate $file\n"),next
+ unless defined $mtime and $mtime;
+
+ unless (defined $Stat{$file}) {
+ $Stat{$file} = $^T;
+ }
+
+ if ($mtime > $Stat{$file}) {
+ delete $INC{$key};
+ # warn "Reloading $key\n";
+ if (my $symref = $UndefFields{$key}) {
+# warn "undeffing fields\n";
+ no strict 'refs';
+ undef %{$symref};
+ }
+ require $key;
+ warn("Apache::Reload: process $$ reloading $key\n")
+ if $DEBUG;
+ }
+ $Stat{$file} = $mtime;
+ }
+
+ return 1;
+}
+
+1;
+__END__
+
+=head1 NAME
+
+Apache::Reload - Reload changed modules
+
+=head1 SYNOPSIS
+
+In httpd.conf:
+
+ PerlInitHandler Apache::Reload
+ PerlSetVar ReloadAll Off
+
+Then your module:
+
+ package My::Apache::Module;
+
+ use Apache::Reload;
+
+ sub handler { ... }
+
+ 1;
+
+=head1 DESCRIPTION
+
+This module is two things. First it is an adaptation of Randal
+Schwartz's Stonehenge::Reload module that attempts to be a little
+more intuitive and makes the usage easier. Stonehenge::Reload was
+written by Randal to make specific modules reload themselves when
+they changed. Unlike Apache::StatINC, Stonehenge::Reload only checked
+the change time of modules that registered themselves with
+Stonehenge::Reload, thus reducing stat() calls. Apache::Reload also
+offers the exact same functionality as Apache::StatINC, and is thus
+designed to be a drop-in replacement. Apache::Reload only checks modules
+that register themselves with Apache::Reload if you explicitly turn off
+the StatINC emulation method (see below). Like Apache::StatINC,
+Apache::Reload must be installed as an Init Handler.
+
+=head2 StatINC Replacement
+
+To use as a StatINC replacement, simply add the following configuration
+to your httpd.conf:
+
+ PerlInitHandler Apache::Reload
+
+=head2 Register Modules Implicitly
+
+To only reload modules that have registered with Apache::Reload,
+add the following to the httpd.conf:
+
+ PerlInitHandler Apache::Reload
+ PerlSetVar ReloadAll Off
+ # ReloadAll defaults to On
+
+Then any modules with the line:
+
+ use Apache::Reload;
+
+Will be reloaded when they change.
+
+=head2 Register Modules Explicitly
+
+You can also register modules explicitly in your httpd.conf file that
+you want to be reloaded on change:
+
+ PerlInitHandler Apache::Reload
+ PerlSetVar ReloadAll Off
+ PerlSetVar ReloadModules "My::Foo My::Bar Foo::Bar::Test"
+
+Note that these are split on whitespace, but the module list B<must>
+be in quotes, otherwise Apache tries to parse the parameter list.
+
+=head2 Special "Touch" File
+
+You can also set a file that you can touch() that causes the reloads to be
+performed. If you set this, and don't touch() the file, the reloads don't
+happen. This can be a great boon in a live environment:
+
+ PerlSetVar ReloadTouchFile /tmp/reload_modules
+
+Now when you're happy with your changes, simply go to the command line and
+type:
+
+ touch /tmp/reload_modules
+
+And your modules will be magically reloaded on the next request. This option
+works in both StatINC emulation mode and the registered modules mode.
+
+=head1 PSUEDOHASHES
+
+The short summary of this is: Don't use psuedohashes. Use an array with
+constant indexes. Its faster in the general case, its more guaranteed, and
+generally, it works.
+
+The long summary is that I've done some work to get this working with
+modules that use psuedo hashes, but its still broken in the case of a
+single module that contains multiple packages that all use psuedohashes.
+
+So don't do that.
+
+=head1 AUTHOR
+
+Matt Sergeant, [EMAIL PROTECTED]
+
+=head1 SEE ALSO
+
+Apache::StatINC, Stonehenge::Reload
+
+=cut
Propchange: trunk/phenomenon/lib/Phenomenon/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Wed May 10 08:12:32 2006
@@ -1,0 +1,1 @@
+.*.swp
Added: trunk/phenomenon/lib/Phenomenon/Apache.pm
URL:
<http://svn.finkproject.org/websvn/filedetails.php?path=/trunk/phenomenon/lib/Phenomenon/Apache.pm&rev=10&repname=user%3a+ranger>
==============================================================================
--- trunk/phenomenon/lib/Phenomenon/Apache.pm (added)
+++ trunk/phenomenon/lib/Phenomenon/Apache.pm Wed May 10 08:12:32 2006
@@ -1,0 +1,92 @@
+package Phenomenon::Apache;
+
+use strict;
+
+use Data::Dumper;
+use IO::Handle;
+
+use Apache::Reload;
+use Apache::Cookie;
+use Apache::Session::File;
+
+use Phenomenon::DB;
+use Phenomenon::Visitor;
+use Phenomenon::Hit;
+
+sub handler($$) {
+ my ($obj, $r) = @_;
+
+ my $db = Phenomenon::DB->new();
+
+ my %session;
+
+ my $session_id;
+ my %cookies = Apache::Cookie->fetch();
+ $session_id = $cookies{'session_id'}->value if (exists
$cookies{'session_id'} and defined $cookies{'session_id'});
+
+ tie %session, 'Apache::Session::File', $session_id, { Directory =>
'/tmp/sessions', LockDirectory => '/tmp/sessions/lock', Transactions => 1 };
+
+ Apache::Cookie->new($r, -name => 'session_id', -value =>
$session{'_session_id'}, -expires => '+365D')->bake;
+ $r->send_http_header("image/gif");
+
+ my %args = $r->args;
+ for my $arg (keys %args) {
+ $args{$arg} =~ s/^\s+//;
+ $args{$arg} =~ s/\s+$//;
+ }
+
+ my $handle = IO::Handle->new();
+ if (open ($handle, "/Users/ranger/cvs/phenomenon/transparent.gif")) {
+ print while (<$handle>);
+ close ($handle);
+ }
+
+ my @keywords;
+
+ if (exists $args{'MetaInfo.keywords'}) {
+ @keywords = map { { keyword => $_ } } split(/\s+/,
$args{'MetaInfo.keywords'});
+ }
+
+ $db->begin_work;
+
+ my $visitor = Phenomenon::Visitor->new(
+ db => $db,
+ session_id => $session{'_session_id'},
+ );
+ unless ($visitor->load(speculative => 1)) {
+ $visitor->save;
+ }
+
+ my $hit = Phenomenon::Hit->new(
+ db => $db,
+ visitor_id => $visitor->id,
+ url => $args{'PageInfo.href'},
+ referrer => $args{'PageInfo.referrer'},
+ user_agent => $ENV{'HTTP_USER_AGENT'},
+ remote_addr => $ENV{'REMOTE_ADDR'},
+ language => $ENV{'HTTP_ACCEPT_LANGUAGE'},
+ browser_width => $args{'BrowserInfo.width'},
+ browser_height => $args{'BrowserInfo.height'},
+ keywords => [EMAIL PROTECTED],
+ );
+ $hit->save;
+
+ print STDERR Dumper([EMAIL PROTECTED]), "\n";
+
+ $db->commit;
+
+ print STDERR "== cookies ==\n";
+ print STDERR Dumper(\%cookies), "\n";
+
+ print STDERR "== arguments ==\n";
+ print STDERR Dumper(\%args), "\n";
+
+ print STDERR "== environment ==\n";
+ for my $key (sort keys %ENV) {
+ print STDERR "$key = $ENV{$key}\n";
+ }
+
+ return 0;
+}
+
+1;
Added: trunk/phenomenon/lib/Phenomenon/DB.pm
URL:
<http://svn.finkproject.org/websvn/filedetails.php?path=/trunk/phenomenon/lib/Phenomenon/DB.pm&rev=10&repname=user%3a+ranger>
==============================================================================
--- trunk/phenomenon/lib/Phenomenon/DB.pm (added)
+++ trunk/phenomenon/lib/Phenomenon/DB.pm Wed May 10 08:12:32 2006
@@ -1,0 +1,27 @@
+package Phenomenon::DB;
+
+use base qw(Rose::DB);
+
+__PACKAGE__->use_private_registry;
+__PACKAGE__->default_domain('development');
+__PACKAGE__->default_type('main');
+
+# Development
+
+__PACKAGE__->register_db(
+ domain => 'development',
+ type => 'main',
+ driver => 'sqlite',
+ database => '/tmp/phenomenon.db',
+);
+
+# Production
+
+__PACKAGE__->register_db(
+ domain => 'development',
+ type => 'main',
+ driver => 'sqlite',
+ database => '/tmp/phenomenon.db',
+);
+
+1;
Added: trunk/phenomenon/lib/Phenomenon/DB/Object.pm
URL:
<http://svn.finkproject.org/websvn/filedetails.php?path=/trunk/phenomenon/lib/Phenomenon/DB/Object.pm&rev=10&repname=user%3a+ranger>
==============================================================================
--- trunk/phenomenon/lib/Phenomenon/DB/Object.pm (added)
+++ trunk/phenomenon/lib/Phenomenon/DB/Object.pm Wed May 10 08:12:32 2006
@@ -1,0 +1,10 @@
+package Phenomenon::DB::Object;
+
+use Apache::Reload;
+
+use Phenomenon::DB;
+use base qw(Rose::DB::Object);
+
+sub init_db { Phenomenon::DB->new }
+
+1;
Added: trunk/phenomenon/lib/Phenomenon/Hit.pm
URL:
<http://svn.finkproject.org/websvn/filedetails.php?path=/trunk/phenomenon/lib/Phenomenon/Hit.pm&rev=10&repname=user%3a+ranger>
==============================================================================
--- trunk/phenomenon/lib/Phenomenon/Hit.pm (added)
+++ trunk/phenomenon/lib/Phenomenon/Hit.pm Wed May 10 08:12:32 2006
@@ -1,0 +1,43 @@
+package Phenomenon::Hit;
+
+use Apache::Reload;
+
+use base qw(Phenomenon::DB::Object);
+use Phenomenon::DB;
+use Phenomenon::HitKeywordMap;
+use Phenomenon::Keyword;
+
+__PACKAGE__->meta->table('hits');
+__PACKAGE__->meta->columns
+(
+ id => { type => 'serial', primary_key => 1, not_null => 1 },
+ url => { type => 'text' },
+ referrer => { type => 'text' },
+ user_agent => { type => 'text' },
+ remote_addr => { type => 'text' },
+ language => { type => 'text' },
+ browser_width => { type => 'int' },
+ browser_height => { type => 'int' },
+ visitor_id => { type => 'int' },
+);
+__PACKAGE__->meta->foreign_keys
+(
+ visitor =>
+ {
+ class => 'Visitor',
+ key_columns => { visitor_id => 'id' },
+ },
+);
+__PACKAGE__->meta->relationships
+(
+ keywords =>
+ {
+ type => 'many to many',
+ map_class => 'Phenomenon::HitKeywordMap',
+ map_from => 'hit',
+ map_to => 'keyword',
+ },
+);
+__PACKAGE__->meta->initialize;
+
+1;
Added: trunk/phenomenon/lib/Phenomenon/Hit/Manager.pm
URL:
<http://svn.finkproject.org/websvn/filedetails.php?path=/trunk/phenomenon/lib/Phenomenon/Hit/Manager.pm&rev=10&repname=user%3a+ranger>
==============================================================================
--- trunk/phenomenon/lib/Phenomenon/Hit/Manager.pm (added)
+++ trunk/phenomenon/lib/Phenomenon/Hit/Manager.pm Wed May 10 08:12:32 2006
@@ -1,0 +1,8 @@
+package Phenomenon::Hit::Manager;
+
+use Apache::Reload;
+
+use Phenomenon::DB;
+use base qw(Rose::DB::Object::Manager);
+
+1;
Added: trunk/phenomenon/lib/Phenomenon/HitKeywordMap.pm
URL:
<http://svn.finkproject.org/websvn/filedetails.php?path=/trunk/phenomenon/lib/Phenomenon/HitKeywordMap.pm&rev=10&repname=user%3a+ranger>
==============================================================================
--- trunk/phenomenon/lib/Phenomenon/HitKeywordMap.pm (added)
+++ trunk/phenomenon/lib/Phenomenon/HitKeywordMap.pm Wed May 10 08:12:32 2006
@@ -1,0 +1,32 @@
+package Phenomenon::HitKeywordMap;
+
+use Apache::Reload;
+
+use base qw(Phenomenon::DB::Object);
+
+use Phenomenon::Hit;
+use Phenomenon::Keyword;
+
+__PACKAGE__->meta->table('hit_keyword_map');
+__PACKAGE__->meta->columns
+(
+ hit_id => { type => 'int', not_null => 1 },
+ keyword_id => { type => 'int', not_null => 1 },
+);
+__PACKAGE__->meta->primary_key_columns('hit_id', 'keyword_id');
+__PACKAGE__->meta->foreign_keys
+(
+ hit =>
+ {
+ class => 'Phenomenon::Hit',
+ key_columns => { hit_id => 'id' },
+ },
+ keyword =>
+ {
+ class => 'Phenomenon::Keyword',
+ key_columns => { keyword_id => 'id' },
+ },
+);
+__PACKAGE__->meta->initialize;
+
+1;
Added: trunk/phenomenon/lib/Phenomenon/Keyword.pm
URL:
<http://svn.finkproject.org/websvn/filedetails.php?path=/trunk/phenomenon/lib/Phenomenon/Keyword.pm&rev=10&repname=user%3a+ranger>
==============================================================================
--- trunk/phenomenon/lib/Phenomenon/Keyword.pm (added)
+++ trunk/phenomenon/lib/Phenomenon/Keyword.pm Wed May 10 08:12:32 2006
@@ -1,0 +1,18 @@
+package Phenomenon::Keyword;
+
+use Apache::Reload;
+
+use base qw(Phenomenon::DB::Object);
+use Phenomenon::DB;
+use Phenomenon::Util;
+
+__PACKAGE__->meta->table('keywords');
+__PACKAGE__->meta->columns
+(
+ id => { type => 'serial', primary_key => 1, not_null => 1 },
+ keyword => { type => 'text' },
+);
+__PACKAGE__->meta->add_unique_key('keyword');
+__PACKAGE__->meta->initialize;
+
+1;
Added: trunk/phenomenon/lib/Phenomenon/Keyword/Manager.pm
URL:
<http://svn.finkproject.org/websvn/filedetails.php?path=/trunk/phenomenon/lib/Phenomenon/Keyword/Manager.pm&rev=10&repname=user%3a+ranger>
==============================================================================
--- trunk/phenomenon/lib/Phenomenon/Keyword/Manager.pm (added)
+++ trunk/phenomenon/lib/Phenomenon/Keyword/Manager.pm Wed May 10 08:12:32 2006
@@ -1,0 +1,8 @@
+package Phenomenon::Keyword::Manager;
+
+use Apache::Reload;
+
+use Phenomenon::DB;
+use base qw(Rose::DB::Object::Manager);
+
+1;
Added: trunk/phenomenon/lib/Phenomenon/Util.pm
URL:
<http://svn.finkproject.org/websvn/filedetails.php?path=/trunk/phenomenon/lib/Phenomenon/Util.pm&rev=10&repname=user%3a+ranger>
==============================================================================
--- trunk/phenomenon/lib/Phenomenon/Util.pm (added)
+++ trunk/phenomenon/lib/Phenomenon/Util.pm Wed May 10 08:12:32 2006
@@ -1,0 +1,5 @@
+package Phenomenon::Util;
+
+use Apache::Reload;
+
+1;
Added: trunk/phenomenon/lib/Phenomenon/Visitor.pm
URL:
<http://svn.finkproject.org/websvn/filedetails.php?path=/trunk/phenomenon/lib/Phenomenon/Visitor.pm&rev=10&repname=user%3a+ranger>
==============================================================================
--- trunk/phenomenon/lib/Phenomenon/Visitor.pm (added)
+++ trunk/phenomenon/lib/Phenomenon/Visitor.pm Wed May 10 08:12:32 2006
@@ -1,0 +1,17 @@
+package Phenomenon::Visitor;
+
+use Apache::Reload;
+
+use base qw(Phenomenon::DB::Object);
+use Phenomenon::DB;
+
+__PACKAGE__->meta->table('visitors');
+__PACKAGE__->meta->columns
+(
+ id => { type => 'serial', primary_key => 1, not_null => 1 },
+ session_id => { type => 'text' },
+);
+__PACKAGE__->meta->add_unique_key('session_id');
+__PACKAGE__->meta->initialize;
+
+1;
Added: trunk/phenomenon/lib/Phenomenon/Visitor/Manager.pm
URL:
<http://svn.finkproject.org/websvn/filedetails.php?path=/trunk/phenomenon/lib/Phenomenon/Visitor/Manager.pm&rev=10&repname=user%3a+ranger>
==============================================================================
--- trunk/phenomenon/lib/Phenomenon/Visitor/Manager.pm (added)
+++ trunk/phenomenon/lib/Phenomenon/Visitor/Manager.pm Wed May 10 08:12:32 2006
@@ -1,0 +1,8 @@
+package Phenomenon::Visitor::Manager;
+
+use Apache::Reload;
+
+use Phenomenon::DB;
+use base qw(Rose::DB::Object::Manager);
+
+1;
Added: trunk/phenomenon/schema.sql
URL:
<http://svn.finkproject.org/websvn/filedetails.php?path=/trunk/phenomenon/schema.sql&rev=10&repname=user%3a+ranger>
==============================================================================
--- trunk/phenomenon/schema.sql (added)
+++ trunk/phenomenon/schema.sql Wed May 10 08:12:32 2006
@@ -1,0 +1,5 @@
+CREATE TABLE visitors (id integer primary key autoincrement, session_id test);
+CREATE TABLE hits (id integer primary key autoincrement, visitor_id integer
not null references visitors(id), url text, page text, referrer text,
user_agent text, remote_addr text, language text, browser_width integer,
browser_height integer);
+CREATE TABLE keywords (id integer primary key autoincrement, keyword text);
+CREATE TABLE hit_keyword_map (hit_id integer not null references hits(id),
keyword_id integer not null references keywords(id));
+
Added: trunk/phenomenon/startup.pl
URL:
<http://svn.finkproject.org/websvn/filedetails.php?path=/trunk/phenomenon/startup.pl&rev=10&repname=user%3a+ranger>
==============================================================================
--- trunk/phenomenon/startup.pl (added)
+++ trunk/phenomenon/startup.pl Wed May 10 08:12:32 2006
@@ -1,0 +1,3 @@
+use lib qw(/Users/ranger/cvs/phenomenon/lib /sw/lib/perl5/5.8.6 /sw/lib/perl5);
+
+1;
Added: trunk/phenomenon/transparent.gif
URL:
<http://svn.finkproject.org/websvn/filedetails.php?path=/trunk/phenomenon/transparent.gif&rev=10&repname=user%3a+ranger>
==============================================================================
Binary file - no diff available.
Propchange: trunk/phenomenon/transparent.gif
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
_______________________________________________
Fink-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fink-commits