Loading

DADA::Profile::Fields

NAME

DADA::Profile::Fields

SYNOPSIS

DESCRIPTION

Public Methods

new

 my $pf = DADA::Profile::Fields->new

new requires no parameters.

A DADA::Profile::Fields object will be returned.

insert

 $df->insert(
 { 
        -email => 'user@example.com',
 }      
 ); 

insert inserts a new record into the profile table. This method requires a few parameters:

-email is required and should hold a valid email address in the form of: user@example.com

-fields holds the Profile Fields passed as a hashref. It is an optional parameter.

-mode sets the way the new profile will be created and can either be set to, writeover or, preserve

When set to, writeover, any existing profile belonging to the email passed in the <-email> parameter will be clobbered.

When set to, preserve, this method will first look and see if an already existing profile exists and if so, will not create a new one, but simply exit the method.

writeover is the default, if no parameter is passed.

-confirmed confirmed can also be passed with a value of either 1 or, 0, with 1 being the default if the parameter is not passed.

Unconfirmed profiles are marked as existing, but not, "live" as a way to save the profile information, until the profile can be confirmed, by a user.

This method should return, 1 on success.

get

 my $prof = $pf->get; 

get returns the Profile Fields for the email address passed in, -email as a hashref.

-email is a required parameter. Not passing it will cause this method to return, undef.

Passing an email that doesn't have a profile saved will also return, undef. Check before by using, exists()

-dotted is an optional paramter, and will return the keys of the hashref appended with, subscriber.

exists

        my $exists = $pf->exists(
                {
                        -email => 'user@example.com', 
                }
        ); 

exists return either 1, if the profile associated with the email address passed in the -email parameter has a profile

or, 0 if there is no profile.

remove

 $pf->remove(
        {
                -email => 'user@example.com', 
        }
 ); 

remove removes the Profile Fields assocaited with the email address passed in the -email parameter.

remove will return the number of rows removed - this should hopefully be only 1. Any larger number would be a serious problem.

-email is a required parameter. Not passing it will cause this method to return, undef.

Passing an email that doesn't have a profile saved will also return, undef. Check before by using, exists()

AUTHOR

Justin Simoni http://dadamailproject.com

LICENSE AND COPYRIGHT

Copyright (c) 1999 - 2014 Justin Simoni All rights reserved.

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.


Dada Mail Project

Download

Installation

Support