tpsgi-hostname 317 B

123456789101112131415161718192021222324
  1. #!/usr/bin/env perl
  2. package TPSGI::Hostname;
  3. use strict;
  4. use warnings;
  5. use FindBin::libs;
  6. use TPSGI;
  7. sub main {
  8. my @args = @_;
  9. my %config = TPSGI::get_config();
  10. die "Could not get hostname" unless $config{domain};
  11. print "$config{domain}\n";
  12. return 0;
  13. }
  14. exit main(@ARGV) unless caller;
  15. 1;