-
-
26 Jan 2018 23:54:05 UTC
- Distribution: Catalyst-Controller-SimpleCAS
- Module version: 1.002
- Source (raw)
- Browse (raw)
- Changes
- How to Contribute
- Repository
- Issues
- Testers (2173 / 0 / 1)
- Kwalitee
Bus factor: 2- 29.73% Coverage
- License: perl_5
- Activity
24 month- Tools
- Download (31.66KB)
- MetaCPAN Explorer
- Permissions
- Subscribe to distribution
- Permalinks
- This version
- Latest version
- Dependencies
- Carp
- Catalyst::Controller
- Catalyst::Utils
- CatalystX::InjectComponent
- Data::Dumper
- Digest::SHA1
- Email::MIME
- Email::MIME::CreateHTML
- Email::MIME::CreateHTML::Resolver::LWP
- Email::Simple
- Encode
- File::Copy
- File::MimeInfo::Magic
- File::Spec::Functions
- HTML::Encoding
- HTML::TokeParser::Simple
- IO::All
- IO::File
- Image::Size
- JSON
- MIME::Base64
- Module::Runtime
- Moose
- Moose::Role
- MooseX::MethodAttributes::Role
- Path::Class
- Scalar::Util
- Storable
- String::Random
- Tie::IxHash
- Try::Tiny
- Types::Standard
- bytes
- namespace::autoclean
- strict
- warnings
- Reverse dependencies
- CPAN Testers List
- Dependency graph
NAME
Catalyst::Plugin::SimpleCAS - Plugin interface to Catalyst::Controller::SimpleCAS
SYNOPSIS
use Catalyst; with 'Catalyst::Plugin::SimpleCAS';
Later on, in your scripts or other backend code:
my $c = 'MyApp'; my $CAS = $c->CAS; # sugar to get the Controller instance # Add content as a string/scalar: my $sha1 = $CAS->add("My cool text!\nbla bla bla"); # Add content from a file: my $sha1 = $CAS->add("/path/to/regular/file"); # Add content by supplying a filehandle: my $fh = Path::Class::File::file("/path/to/regular/file")->openr; my $sha1 = $CAS->add($fh); # Fetch content as a string/scalar: my $data = $CAS->fetch($sha1); # Fetch content as a filehandle: my $data = $CAS->fetch_fh($sha1);
DESCRIPTION
This class provides a simple Catalyst Plugin interface to Catalyst::Controller::SimpleCAS. All it does is inject the SimpleCAS controller into the application and sets up the sugar method
CAS
in the main app class/context ($c
).This module was originally developed for and within RapidApp before being extracted into its own module. This module provides server-side functionality which can be used for any Catalyst application, however, it is up to the developer to write the associated front-end interfaces to consume its API (unless you are using RapidApp to begin with).
See Catalyst::Controller::SimpleCAS for more information and API documentation.
CONFIG PARAMS
controller_namespace
Namespace of the SimpleCAS controller to inject. Defaults to 'SimpleCAS'
METHODS
CAS
Convenience method to return the SimpelCAS controller. Assuming the
controller_namespace
is left at its default, these are equivelent:my $CAS = $c->controller('SimpleCAS'); # same as: my $CAS = $c->CAS;
inject_simplecas_controller
Method which gets called automatically that does the actual injection of the controller into the Catalyst application. Should never be called directly. It is being provided in case the need arises to hook at this point in the code (i.e. with an around modifier)
SEE ALSO
AUTHOR
Henry Van Styn <vanstyn@cpan.org>
COPYRIGHT AND LICENSE
This software is copyright (c) 2016 by IntelliTree Solutions llc.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
Module Install Instructions
To install Catalyst::Controller::SimpleCAS, copy and paste the appropriate command in to your terminal.
cpanm Catalyst::Controller::SimpleCAS
perl -MCPAN -e shell install Catalyst::Controller::SimpleCAS
For more information on module installation, please visit the detailed CPAN module installation guide.