{"id":17109729,"url":"https://github.com/bleargh45/cgi-application-plugin-tt-lastmodified","last_synced_at":"2025-03-23T21:41:49.124Z","repository":{"id":59149819,"uuid":"337625742","full_name":"bleargh45/CGI-Application-Plugin-TT-LastModified","owner":"bleargh45","description":"Set \"Last-Modified\" header based on TT template","archived":false,"fork":false,"pushed_at":"2024-04-18T15:01:10.000Z","size":42,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-29T05:14:03.276Z","etag":null,"topics":["cgi-application","last-modified","perl","template-toolkit"],"latest_commit_sha":null,"homepage":"http://metacpan.org/release/CGI-Application-Plugin-TT-LastModified/","language":"Perl","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bleargh45.png","metadata":{"files":{"readme":"README.md","changelog":"Changes","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2021-02-10T05:22:37.000Z","updated_at":"2023-03-13T02:52:06.000Z","dependencies_parsed_at":"2024-04-18T16:30:43.327Z","dependency_job_id":"ce476105-a461-415b-af79-210e03b3fe05","html_url":"https://github.com/bleargh45/CGI-Application-Plugin-TT-LastModified","commit_stats":{"total_commits":27,"total_committers":1,"mean_commits":27.0,"dds":0.0,"last_synced_commit":"1b312ec66e66ac45899dfa7623a9bb10f3126560"},"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bleargh45%2FCGI-Application-Plugin-TT-LastModified","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bleargh45%2FCGI-Application-Plugin-TT-LastModified/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bleargh45%2FCGI-Application-Plugin-TT-LastModified/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bleargh45%2FCGI-Application-Plugin-TT-LastModified/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bleargh45","download_url":"https://codeload.github.com/bleargh45/CGI-Application-Plugin-TT-LastModified/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245175322,"owners_count":20572781,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cgi-application","last-modified","perl","template-toolkit"],"created_at":"2024-10-14T16:24:11.632Z","updated_at":"2025-03-23T21:41:49.100Z","avatar_url":"https://github.com/bleargh45.png","language":"Perl","funding_links":[],"categories":[],"sub_categories":[],"readme":"# NAME\n\nCGI::Application::Plugin::TT::LastModified - Set \"Last-Modified\" header based on TT template\n\n# SYNOPSIS\n\n```perl\n# when you want to set the \"Last-Modified\" header manually\n  use base qw(CGI::Application);\n  use CGI::Application::Plugin::TT;\n  use CGI::Application::Plugin::TT::LastModified;\n\n  sub my_runmode {\n      my $self = shift;\n      my %params = (\n          # ...\n          );\n      my $html = $self-\u003ett_process( 'template.html', \\%params );\n      $self-\u003ett_set_last_modified_header();\n      return $html;\n  }\n\n# when you want the \"Last-Modified\" header set automatically\n  use base qw(CGI::Application);\n  use CGI::Application::Plugin::TT;\n  use CGI::Application::Plugin::TT::LastModified qw(:auto);\n\n  sub my_runmode {\n      my $self = shift;\n      my %params = (\n          # ...\n          );\n      return $self-\u003ett_process( 'template.html', \\%params );\n  }\n```\n\n# DESCRIPTION\n\n`CGI::Application::Plugin::TT::LastModified` adds support to\n`CGI::Application` for setting a \"Last-Modified\" header based on the most\nrecent modification time of _any_ of the components of a template that was\nprocessed with TT.\n\nNormally you'll want to call it manually, on as \"as needed\" basis; if you're\nprocessing templates with TT you're most likely dealing with dynamic content\n(in which case you probably don't even want a \"Last-Modified\" header).  The odd\ntime you'll want to set a \"Last-Modified\" header, though, this plugin helps\nmake that easier.\n\n**If** you have a desire to have the \"Last-Modified\" header set automatically\nfor you, though, `CGI::Application::Plugin::TT::LastModified` does have an\n`:auto` import tag which auto-registers [\"tt\\_set\\_last\\_modified\\_header()\"](#tt_set_last_modified_header) as a\n\"tt\\_post\\_process\" hook for you.  If you've got an app that just processes\nstatic TT pages and generates output, this will be useful for you.\n\n# METHODS\n\n- import()\n\n    Custom import routine, which allows for `tt_set_last_modified_header()` to\n    be auto-added in as a TT post process hook.\n\n- tt\\_last\\_modified()\n\n    Returns the most recent modification time for any component of the most\n    recently processed template (via `tt_process()`). Time is returned back to\n    the caller as \"the number of seconds since the epoch\".\n\n- tt\\_set\\_last\\_modified\\_header()\n\n    Sets a \"Last-Modified\" header in the HTTP response, equivalent to the last\n    modification time of the template components as returned by\n    `tt_last_modified()`.\n\n# AUTHOR\n\nGraham TerMarsch (cpan@howlingfrog.com)\n\n# COPYRIGHT\n\nCopyright (C) 2007, Graham TerMarsch.  All Rights Reserved.\n\nThis is free software; you can redistribute it and/or modify it under the same\nterms as Perl itself.\n\n# SEE ALSO\n\n- [CGI::Application::Plugin::TT](https://metacpan.org/pod/CGI%3A%3AApplication%3A%3APlugin%3A%3ATT)\n- [CGI::Application](https://metacpan.org/pod/CGI%3A%3AApplication)\n- [Template](https://metacpan.org/pod/Template)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbleargh45%2Fcgi-application-plugin-tt-lastmodified","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbleargh45%2Fcgi-application-plugin-tt-lastmodified","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbleargh45%2Fcgi-application-plugin-tt-lastmodified/lists"}