| Next: Yawns::RSS | Previous: Yawns::Polls | [Table of Contents] |
Yawns::Preferences - A module for working with user preferences.
#!/usr/bin/perl -w
use Yawns::Preferences;
use strict;
my $accessor = Yawns::Preferences->new( username => "bob" );
# get specific preference
my $prefs = $accessor->getAll();
# get single preference.
my $key = $accessor->getPreference( "posting_format" );
# set one
$accessor->setPreference( "posting_format", "textile" );
This module deals with the contents of the preferences table.
Create a new instance of this object.
Get all key and values from a user preferences.
Return a single preference from the database.
Set a single preference for the given user.
Delete all preferences for the given user.
Clean any cached content we might have.
Steve Kemp
http://www.steve.org.uk/
Copyright (c) 2007 by Steve Kemp. All rights reserved.
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. The LICENSE file contains the full text of the license.