|
Revision 1752
(checked in by miyagawa, 2 years ago)
|
add misc CustomFeed?::Script example scripts
|
- Property svn:executable set to
*
|
| Line | |
|---|
| 1 |
|
|---|
| 2 |
use strict; |
|---|
| 3 |
use warnings; |
|---|
| 4 |
use Net::Domain::ExpireDate; |
|---|
| 5 |
use YAML; |
|---|
| 6 |
|
|---|
| 7 |
my @domains = @ARGV |
|---|
| 8 |
or die "Usage: domain-expire.pl domain1 domain2 ...\n"; |
|---|
| 9 |
|
|---|
| 10 |
my $output = { |
|---|
| 11 |
title => "Expire dates for my domains", |
|---|
| 12 |
entry => [], |
|---|
| 13 |
}; |
|---|
| 14 |
|
|---|
| 15 |
for my $domain (@domains) { |
|---|
| 16 |
my $expires = expire_date($domain); |
|---|
| 17 |
push @{$output->{entry}}, { |
|---|
| 18 |
title => $domain, |
|---|
| 19 |
date => "$expires", |
|---|
| 20 |
}; |
|---|
| 21 |
} |
|---|
| 22 |
|
|---|
| 23 |
print YAML::Dump $output; |
|---|
| 24 |
|
|---|