NAME
Wirebird - Community software, so that people who hate mailing lists can still converse with people who hate web forums.
VERSION
Version 0.93
SYNOPSIS
Wirebird is the core module for (as you might guess) the Wirebird framework. It ties everything together.
use Wirebird;
my $status = Wirebird->new($configfile, $sitename);
...
EXPORT
$wirebird - The Wirebird object.
METHODS
new($configfile, $sitename)
Initializes the Wirebird object. The configfile should be a fully specified path (defaults to /opt/wirebird/data/site.conf), and the sitename is optional. If the config file contains multiple sites, it will attempt to match based on domain name.
site
$wirebird->site($siteblock)
Change the active site within a multi-site config.
load_groupinfo
$wirebird->load_groupinfo($forcereload);
Load the category/group/topic structure (
cats
my $cats = $wirebird->cats();
Returns a reference to a list of names of the categories - including private ones, so use it cautiously.
groups
my $groups = $wirebird->groups();
Returns a reference to a list of names of the groups - including private ones, so use it cautiously.
topics
my $topics = $wirebird->topics( 'groupname' );
Given a group, returns a list of the topic names.
sanitize
print $wirebird->sanitize($content);
Uses HTML::Scrubber and HTML::Truncate to clean up HTML fragments.
phrasebook
my $stmt_count = $wirebird->phrasebook('filename');
Registers the phrases in a file, returning the count.
rawquery
my $data = $wirebird->rawquery('queryname');
Returns the raw query string for a particular query tag.
requires
if ($wirebird->requires('queryname', 'parm1') ) { ... }
Tests whether a particular query requires a given parameter.
query
my $data = $wirebird->query('queryname', {
parm1 => $parm1,
parm2 => $parm2,
});
Prepares and executes a non-SELECT query.
Really should return a more informative result.
queryfetch
my $data = $self->queryfetch('queryname', {
parm1 => $parm1,
parm2 => $parm2,
});
Prepares and executes a SELECT query. Returns an array of hashes containing the result.
FUNCTIONS
iscat($catname)
if ( $wirebird->iscat('testcategory') ) { ... }
Tests a catname to see if it exists. Categories are defined by their existence in the wbf_groups table.
isgroup($groupname)
if ( $wirebird->isgroup('testgroup') ) { ... }
Tests a groupname to see if it exists. Groups are defined by their existence in the wbf_groups table.
istopic($groupname, $topicname)
if ( $wirebird->istopic('testgroup', 'testtopic') ) { ... }
Tests a topicname to see if it exists. Test requires a valid group.
ispage($groupname, $topicname, $pagename)
if ( $wirebird->ispage('testgroup', 'testtopic', 'testpage') ) { ... }
Tests a pagename to see if it exists. Test requires a valid group and topic.
SEE ALSO
Wirebird::RESTful, the REST-based framework for Wirebird web applications, and a raft of related modules.
Wirebird has a Wirebird-based forum/blog/news site at <http://www.wirebird.com/>.
AUTHOR
Karen J. Cravens,
< >>
BUGS
Please report any bugs or feature requests to bug-wirebird at rt.cpan.org, or through the web interface at L<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Wirebird>. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
SUPPORT
You can find documentation for this module with the perldoc command.
perldoc Wirebird
You can also look for information at:
- * Wirebird's home page
- L<http://www.wirebird.com/>
- * RT: CPAN's request tracker
- L<http://rt.cpan.org/NoAuth/Bugs.html?Dist=Wirebird>
- * AnnoCPAN: Annotated CPAN documentation
- L<http://annocpan.org/dist/Wirebird>
- * CPAN Ratings
- L<http://cpanratings.perl.org/d/Wirebird>
- * Search CPAN
- L<http://search.cpan.org/dist/Wirebird>
ACKNOWLEDGEMENTS
Simon COZENS, for launching the excellent Perl Email Project
Ricardo SIGNES, for picking up PEP and running with it
Mike FELDHUSEN, for filling my Perl-related bookshelf
and of course,
Carl CRAVENS, for convincing me to try that odd little "Perl" thing.
COPYRIGHT & LICENSE
Copyright 2008 Karen J. Cravens, all rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.