Skip to content

Commit

Permalink
Add hostname in HTML comment
Browse files Browse the repository at this point in the history
  • Loading branch information
davorg committed May 17, 2024
1 parent 501d3e3 commit 5d9116b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
11 changes: 11 additions & 0 deletions Succession/lib/Succession/App.pm
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ use DateTime::Format::Strptime;
use Lingua::EN::Numbers 'num2en';
use XML::Feed;
use URI;
use Sys::Hostname;

use Succession::Model;
with 'MooX::Role::JSON_LD';
Expand Down Expand Up @@ -45,6 +46,16 @@ sub _build_request {
die "No request attribute given to " . __PACKAGE__;
}

has host => (
is => 'ro',
isa => 'Str',
lazy_build => 1,
);

sub _build_host {
return hostname;
}

has model => (
is => 'ro',
isa => 'Succession::Model',
Expand Down
1 change: 1 addition & 0 deletions Succession/views/layouts/main.tt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
<!-- You'd never believe I'm a republican, would you! -->
<html lang="en">
<head>
<!-- succession app running on <% app.host %> -->
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
Expand Down

0 comments on commit 5d9116b

Please sign in to comment.