RapidApp::DirectLink::LinkFactory
CREATE TABLE direct_link ( create_date DATE NOT NULL, random_hash char(8) NOT NULL, params varchar(255) NOT NULL, ); ... my $directLinks= RapidApp::DirectLink::LinkFactory(schema => $self->c->model("DB")); my $directLinks= RapidApp::DirectLink::LinkFactory(schema => $self->c->model("DB"), directLinkSourceName => 'MyDirectLink'); # careful, this one binds the LinkFactory to a catalyst instance my $directLinks= RapidApp::DirectLink::LinkFactory(directLinkRS => sub { $self->c->model("DB::DirectLink") }); my $link= $directLinks->create(auth => { user => $contact_id, acl => { etc } }, targetUrl => 'foo/bar'); my $link= $directLinks->load(linkUid => $self->c->request->params->{id});
This class provides methods for creating, retrieving, and cleaning DirectLinks.
It requires a ResultSource with the following definition: create_date DATE NOT NULL, random_hash char(8) NOT NULL, params varchar(255) NOT NULL,
By default, it looks for a ResultSource named 'DirectLink', though this is configurable.
Some object which can "->source($name)". Will usually be a DBIx::Class::Schema.
The name of the result source to use, if using the 'schema' attribute.
Either an instance of DBIx::Class::ResultSource, or a coderef which returns one when evaluated with no arguments.
If directLinkRS is given, schema and directLinkSourceName will be ignored.
Create a new DirectLink from supplied parameters. Most of the parameters will become part of a hash which gets serialized into a JSON string, so make sure they are serializable.
This function takes care of ensuring that the current date and a unique hash are chosen.
The parameters may be anything that is valid for the constructor of DirectLink::Link.
Load a link from the database via its unique ID. This is used when the user follows a hyperlink to the DirectLink::Redirector controller.
RapidApp::DirectLink::Link
RapidApp::DirectLink::SessionLoader
1 POD Error
The following errors were encountered while parsing the POD:
You forgot a '=back' before '=head1'
To install RapidApp, copy and paste the appropriate command in to your terminal.
cpanm
cpanm RapidApp
CPAN shell
perl -MCPAN -e shell install RapidApp
For more information on module installation, please visit the detailed CPAN module installation guide.