AWS-CloudFront

 view release on metacpan or  search on metacpan

inc/Module/Install.pm  view on Meta::CPAN

}

# Cloned from Params::Util::_CLASS
sub _CLASS ($) {
	(
		defined $_[0]
		and
		! ref $_[0]
		and
		$_[0] =~ m/^[^\W\d]\w*(?:::\w+)*$/s
	) ? $_[0] : undef;
}

1;

# Copyright 2008 - 2009 Adam Kennedy.

lib/AWS/CloudFront.pm  view on Meta::CPAN

    {
    
    }# end if()
    my $dist = AWS::CloudFront::Distribution->new(
      cf                          => $s,
      Id                          => $xpc->findvalue('.//cf:Id', $node),
      Status                      => $xpc->findvalue('.//cf:Status', $node),
      LastModifiedTime            => $xpc->findvalue('.//cf:LastModifiedTime', $node),
      DomainName                  => $xpc->findvalue('.//cf:DomainName', $node),
      Enabled                     => $xpc->findvalue('.//cf:Enabled') eq 'true' ? 1 : 0,
      DefaultRootObject           => $xpc->findvalue('.//cf:DefaultRootObject') || undef,
      CNAME                       => $xpc->findvalue('.//cf:CNAME') || undef,
      InProgressValidationBatches => $xpc->findvalue('.//cf:InProgressValidationBatches') || undef,
      Comment                     => $xpc->findvalue('.//cf:Comment') || undef,
      CallerReference             => $xpc->findvalue('.//cf:CallerReference') || undef,
      Origin                      => $origin,
      # TODO: Logging, ActiveTrustedSigners.
    );
    return $dist;
  }# end if()
}# end distribution()


sub add_distribution
{

lib/AWS/CloudFront.pm  view on Meta::CPAN

    {
    
    }# end if()
    my $dist = AWS::CloudFront::Distribution->new(
      cf                          => $s,
      Id                          => $xpc->findvalue('.//cf:Id', $node),
      Status                      => $xpc->findvalue('.//cf:Status', $node),
      LastModifiedTime            => $xpc->findvalue('.//cf:LastModifiedTime', $node),
      DomainName                  => $xpc->findvalue('.//cf:DomainName', $node),
      Enabled                     => $xpc->findvalue('.//cf:Enabled') eq 'true' ? 1 : 0,
      DefaultRootObject           => $xpc->findvalue('.//cf:DefaultRootObject') || undef,
      CNAME                       => $xpc->findvalue('.//cf:CNAME') || undef,
      InProgressValidationBatches => $xpc->findvalue('.//cf:InProgressValidationBatches') || undef,
      Comment                     => $xpc->findvalue('.//cf:Comment') || undef,
      CallerReference             => $xpc->findvalue('.//cf:CallerReference') || undef,
      Origin                      => $origin,
      # TODO: Logging, ActiveTrustedSigners.
    );
    return $dist;
  }# end if()
}# end add_distribution()


sub distributions
{

lib/AWS/CloudFront.pm  view on Meta::CPAN

    {
      # TODO
    }# end if()
    my $dist = AWS::CloudFront::Distribution->new(
      cf                          => $s,
      Id                          => $xpc->findvalue('.//cf:Id', $node),
      Status                      => $xpc->findvalue('.//cf:Status', $node),
      LastModifiedTime            => $xpc->findvalue('.//cf:LastModifiedTime', $node),
      DomainName                  => $xpc->findvalue('.//cf:DomainName', $node),
      Enabled                     => $xpc->findvalue('.//cf:Enabled') eq 'true' ? 1 : 0,
      DefaultRootObject           => $xpc->findvalue('.//cf:DefaultRootObject') || undef,
      CNAME                       => $xpc->findvalue('.//cf:CNAME') || undef,
      InProgressValidationBatches => $xpc->findvalue('.//cf:InProgressValidationBatches') || undef,
      Comment                     => $xpc->findvalue('.//cf:Comment') || undef,
      CallerReference             => $xpc->findvalue('.//cf:CallerReference') || undef,
      Origin                      => $origin,
      # TODO: Logging, ActiveTrustedSigners.
    );
    push @dists, $dist;
  }# end foreach()
  
  return @dists;
}# end distributions()




( run in 0.953 second using v1.01-cache-2.11-cpan-d80b1682f3f )