The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

WWW::Wikevent::Event

SYNOPSIS

  use WWW::Wikevent::Event;

  my $event = WWW::Wikevent::Event->new();

but more usually you will get an event object from a Wikevent bot:

  my $bot = WWW::Wikevent::Bot->new();
  my $event = $bot->add_event();

Then use accessor methods to set event data:

  $event->name( 'Hideout Block Party' );
  $event->price( '$10' );
  $event->date( '2007-09-09' );
  $event->locality( 'Chicago' );
  $event->venue( 'The Hideout' );

etcetera. Then:

  print $event;

which will print the event out as wikitext.

DESCRIPTION

WWW::Wikevent::Event is a package which will help you write scraper scripts for gathering events from venue and artist websites and for inclusion in the Free content events compendium, Wikevent.

The module takes care of building up an event tag for Wikevent, so you can get busy with the fun work of scraping a venue's web pages for the data.

CONSTANTS

$REQ_WARNING;

The warning given if you print an event which is missing required attributes. In fact there really aren't any truly required attributes, but these are needed to correctly place an event on the Wikevent site.

CONSTRUCTORS

new

  my $event = WWW::Wikevent::Event->new();

Creates and returns a new event object.

ACCESSORS

name

  $event->name( $name );
  my $name = $event->name();

The name of the event.

date

  $event->date( $date_string );
  my $date_string = $event->date();

The date of the event.

While Wikevent will accept and try to work with a number of date formats, in practice the very best results will be achieved by using the a format like '2007-09-20'.

time

  $event->time( $time_string );
  my $time_string = $event->time();

The start time of the event.

Wikevent accepts a fairly wide range of formats for the time fields. You can use am/pm times like this: "9pm", "9:15pm", or if you prefer 24 hour times like this: "15:30" or even the French style "15h30".

endtime

  $event->endtime( $time_string );
  my $time_string = $event->endtime();
  

The time at which your event ends.

See time for details.

duration

   $event->duration( $duration_string );
   my $duration_string = $event->duration();

The duration of the event.

An alternative to setting the endtime, this field accepts pretty much the same format as the time fields.

price

  $event->price( $price_string );
  my $price_string = $event->price();

The price of attending, and some short info.

This is a free text string, but should be used sparingly to report ticket and door prices.

tickets

    $event->tickets( $tickets_url );
    my $tickets_url = $event->tickets();

A URL which points to the venue's e-commerce page, if there is one.

This field must be a URL or it won't work. Please pay attention to any rules that the venue site might have about "deep" linking, and do make sure that you only link to the venue site, or it's designated agent, NEVER to some 3rd party.

restrictions

  $event->restrictions( $restrictions );
  my $restrictions = $event->restrictions();

Any restrictions placed on attendance.

In many jursidtictions there are limits on who can attend events at which alcohol is being sold, for instance. This field is for recording those rules, examples might be "21 and over", or "18 and over", or "All Ages".

lang

   $event->lang( $language_code );
   my $language_code = $event->lang();

A comma seperated list of two letter language codes for languages which will be used on stage at the event.

locality

  $event->locality( $locality );
  my $locality = $event->locality();

The city, town, or village in which the event is taking place.

venue

  $event->venue( $venue );
  my $venue = $event->venue();

The club, hall, auditorium, or street where the event is taking place.

desc

  $event->desc( $wikitext );
  my $wikitext = $event->desc();

A discription of the event in Mediawiki wikitext.

For a complete description of the Wikitext markup language please see the http://mediawiki.org.

who

  $event->who( @who );
  $event->who( $who_ref );
  my @who = $event->who();
  my $who_ref = $event->who();

An array, or array reference, of names of artists, etc. appearing at the event.

It's best to use this field and its related methods only if you can't include the appropriate markup in the description wikitext itself. Don't do both, since this list will be printed out as a wikitext unordered list at the top of the event description.

what

  $event->what( @what );
  $event->what( $what_ref );
  my @what = $event->what();
  my $what_ref = $event->what();

An array, or array reference, of names of cateogories to which this event belongs.

METHODS

add_who

  $event->add_who( $name );

Add a single artist, organizer, etc. to the who list.

add_what

  $event->add_what( $category );

Add a single category to the what list.

who_string

  $who_tags = $this->who_string();

Renders the who list as a as tags for inclusion in the event description.

what_string

  $what_tags = $this->what_string();

Renders the what list as a as tags for inclusion in the event description.

to_string

  my $event_tag = $event->to_string();

Renders the event as an Event tag for inclusion on Wikevent.

BUGS

Please submit bug reports to the CPAN bug tracker at http://rt.cpan.org/NoAuth/Bugs.html?Dist=www-wikevent-bot.

DISCUSSION

Discussion should take place on the Wiki, probably on the page "/wikevent.org/en/Wikevent:Perl library" in http:

AUTHORS

Mark Jaroski <mark@geekhive.net>

Original author, maintainer

LICENSE

Copyright (c) 2004-2005 Mark Jaroski.

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