NAME

Catalyst::Plugin::Static::File - Serve a specific static file

SYNOPSIS

In your Catalyst class:

use Catalyst qw/
    Static::File
  /;

In a controller method:

$c->serve_static_file( $absolute_path, $type );

DESCRIPTION

This plugin provides a simple method for your Catalyst app to send a specific static file.

Unlike Catalyst::Plugin::Static::Simple,

RECENT CHANGES

Changes for version v0.2.5 (2026-07-17)

See the Changes file for more details.

REQUIREMENTS

This module lists the following modules as runtime dependencies:

See the cpanfile file for the full list of prerequisites.

INSTALLATION

The latest version of this module (along with any dependencies) can be installed from CPAN with the cpan tool that is included with Perl:

cpan Catalyst::Plugin::Static::File

You can also extract the distribution archive and install this module (along with any dependencies):

cpan .

You can also install this module manually using the following commands:

perl Makefile.PL
make
make test
make install

If you are working with the source repository, then it may not have a Makefile.PL file. But you can use the Dist::Zilla tool in anger to build and install this module:

dzil build
dzil test
dzil install --install-command="cpan ."

For more information, see How to install CPAN modules.

SECURITY CONSIDERATIONS

The serve_static_file method does not validate the file that is passed to it.

You should ensure that arbitrary filenames are not passed to it. You should strictly validate any external data that is used for generating the filename.

SUPPORT

Only the latest version of this module will be supported.

This module requires Perl v5.14 or later. Future releases may only support Perl versions released in the last ten years.

This module requires Catalyst v5.90129 or later.

Reporting Bugs and Submitting Feature Requests

Please report any bugs or feature requests on the bugtracker website https://github.com/robrwo/Catalyst-Plugin-Static-File/issues

When submitting a bug or request, please include a test-file or a patch to an existing test-file that illustrates the bug or desired feature.

Reporting Security Vulnerabilities

Security issues should not be reported on the bugtracker website. Please see SECURITY.md for instructions how to report security vulnerabilities

SOURCE

The development version is on github at https://github.com/robrwo/Catalyst-Plugin-Static-File and may be cloned from https://github.com/robrwo/Catalyst-Plugin-Static-File.git

AUTHOR

Robert Rothenberg perl@rhizomnic.com

COPYRIGHT AND LICENSE

This software is Copyright (c) 2023-2026 by Robert Rothenberg.

This is free software, licensed under:

The Artistic License 2.0 (GPL Compatible)

SEE ALSO

Catalyst

Catalyst::Plugin::Static::Simple