Catalyst::Model::TextLinkAds - Catalyst model for Text Link Ads


Catalyst-Model-TextLinkAds documentation Contained in the Catalyst-Model-TextLinkAds distribution.

Index


Code Index:

NAME

Top

Catalyst::Model::TextLinkAds - Catalyst model for Text Link Ads

SYNOPSIS

Top

    # Use the helper to add a TextLinkAds model to your application...
    script/myapp_create.pl create model TextLinkAds TextLinkAds

    


    # lib/MyApp/Model/TextLinkAds.pm

    package MyApp::Model::TextLinkAds;

    use base qw/ Catalyst::Model::TextLinkAds /;

    __PACKAGE__->config(
        cache  => 0,      # optional: default uses Cache::FileCache
        tmpdir => '/tmp', # optional: default File::Spec->tmpdir
    );

    


    1;

    


    # For Catalyst::View::TT...
    <ul>
    [%- FOREACH link = c.model('TextLinkAds').fetch( my_inventory_key ) %]
        <li>
            [% link.beforeText %]
            <a href="[% link.URL %]">[% link.Text %]</a>
            [% link.afterText %]
        </li>
    [%- END %]
    </ul>




DESCRIPTION

Top

This is a Catalyst model class that fetches advertiser information for a given Text Link Ads publisher account.

See http://www.text-link-ads.com/publisher_program.php?ref=23206.

METHODS

Top

->new()

Instantiate a new TextLinkAds model. See TextLinkAds's new method for the options available.

ACCEPT_CONTEXT

Return the TextLinkAds object. Called automatically via $c->model('TextLinkAds');

SEE ALSO

Top

Catalyst, Catalyst::Helper::Model::TextLinkAds, TextLinkAds

DEPENDENCIES

Top

Carp

Catalyst::Model

Catalyst::Utils

Class::C3

TextLinkAds

BUGS

Top

Please report any bugs or feature requests to bug-catalyst-model-textlinkads at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Catalyst-Model-TextLinkAds.

SUPPORT

Top

You can find documentation for this module with the perldoc command.

    perldoc Catalyst::Model::TextLinkAds

You may also look for information at:

* Catalyst::Model::TextLinkAds

http://perlprogrammer.co.uk/modules/Catalyst::Model::TextLinkAds/

* AnnoCPAN: Annotated CPAN documentation

http://annocpan.org/dist/Catalyst-Model-TextLinkAds/

* RT: CPAN's request tracker

http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Catalyst-Model-TextLinkAds

* Search CPAN

http://search.cpan.org/dist/Catalyst-Model-TextLinkAds/

AUTHOR

Top

Dave Cardwell <dcardwell@cpan.org>

COPYRIGHT AND LICENSE

Top


Catalyst-Model-TextLinkAds documentation Contained in the Catalyst-Model-TextLinkAds distribution.
package Catalyst::Model::TextLinkAds;

use strict;
use warnings;

use base qw/ Catalyst::Model /;

use Carp qw( croak );
use Catalyst::Utils ();
use Class::C3 ();
use TextLinkAds ();

our $VERSION = '0.01';



sub new {
    my $self  = shift->next::method(@_);
    my $class = ref($self);
    
    my ( $c, $args ) = @_;
    
    # Instantiate a new C<TextLinkAds> object...
    $self->{'.tla'} = TextLinkAds->new(
        Catalyst::Utils::merge_hashes( $args, $self->config )
    );
    
    return $self;
}



sub ACCEPT_CONTEXT {
    return shift->{'.tla'};
}


1;  # End of the module code; everything from here is documentation...
__END__