Gavin Henry > Catalyst-Plugin-Email-Page > Catalyst::Plugin::Email::Page

Download:
Catalyst-Plugin-Email-Page-0.26.tar.gz

Dependencies

Annotate this POD

CPAN RT

Open  1
View/Report Bugs
Module Version: 0.26   Source  

NAME ^

Catalyst::Plugin::Email::Page - Email your Catalyst page

VERSION ^

This document describes Catalyst::Plugin::Email::Page version 0.26

SYNOPSIS ^

    use Catalyst::Plugin::Email::Page;

    __PACKAGE__->config->{email_page}{
                   email     = q{webmaster@example.com},
                   subject   = q{User Report for},
                   link_text = q{Report Page},
                };

    # In your Template
    [% c.email_page_url %] 

DESCRIPTION ^

This is a simple plugin that lets a developer set and forget e-mail links in Catalyst

INTERFACE ^

email_page_url

Returns a link in the form of: mailto:webmaster@example.com?subject=User Report for http://yours.com/

The mailto subject is escaped using uri_escape_utf8 from URI::Escape and http://yours.com/ is the current pages uri

email_page_body

Allows you to e-mail the whole page to someone once you have the right template. Used the same way as email_page_url

To do.

email_page_anchor

Allows you to e-mail a page anchor. Used the same way as email_page_url

To do.

_construct_url

Internal routine.

Reads in the various configuration settings and constructs the mailto link. See "CONFIGURATION AND ENVIRONMENT"

DIAGNOSTICS ^

Can't locate Readonly.pm in @INC (@INC contains:

Readonly is required

Install it via the usual ways:

    cpan Readonly
    perl -MCPAN -e shell

Can't locate URI/Escape.pm in @INC (@INC contains:

URI::Escape is required. See above for standard way to install

CONFIGURATION AND ENVIRONMENT ^

Catalyst::Plugin::Email::Page requires no configuration files or environment variables, but you'd best change the mailto address.

Configuring with YAML

Set Configuration to be loaded via Config.yml in YourApp.pm

    use YAML qw(LoadFile);
    use Path::Class 'file';

    __PACKAGE__->config(
        LoadFile(
            file(__PACKAGE__->config->{home}, 'Config.yml')
        )
    );

Settings in Config.yml

    # Email::Page
    email_page:
      email: support@example.com
      subject: Error Report for
      link_text: Report Me

DEPENDENCIES ^

Readonly, URI::Escape and of course Catalyst

INCOMPATIBILITIES ^

None reported.

BUGS AND LIMITATIONS ^

Initial Bug ID 17248, as reported by CPAN ID DAKKAR

Fixed in version 0.25, which now escapes the mailto subject, hence the URI::Escape requirement.

Thanks DAKKAR.

Please report any bugs or feature requests to bug-catalyst-plugin-email-page@rt.cpan.org, or through the web interface at http://rt.cpan.org.

TO DO ^

Add more methods.

Finish empty ones and add settings for using images instead of link text.

More Tests!

AUTHOR ^

Gavin Henry <ghenry@suretecsystems.com>

LICENCE AND COPYRIGHT ^

Copyright (c) 2006, Gavin Henry <ghenry@suretecsystems.com>. All rights reserved.

This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See perlartistic.

DISCLAIMER OF WARRANTY ^

BECAUSE THIS SOFTWARE IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE SOFTWARE, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE SOFTWARE "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE IS WITH YOU. SHOULD THE SOFTWARE PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR, OR CORRECTION.

IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE SOFTWARE AS PERMITTED BY THE ABOVE LICENCE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE SOFTWARE (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE SOFTWARE TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.

syntax highlighting: