| 1 | package Net::Fastly::VCL; | ||||||||||
| 2 | |||||||||||
| 3 | 5 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 4 | 5 | ▶ | use base qw(Net::Fastly::BelongsToServiceAndVersion); | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 5 | |||||||||||
| 6 | 5 | Net::Fastly::VCL->mk_accessors(qw(service_id name content comment main)); | |||||||||
| 7 | |||||||||||
| 8 | =head1 NAME | ||||||||||
| 9 | |||||||||||
| 10 | Net::Fastly::VCL - An internal representation of a Varnish Configuration Language file | ||||||||||
| 11 | |||||||||||
| 12 | =head1 ACCESSORS | ||||||||||
| 13 | |||||||||||
| 14 | =head2 service_id | ||||||||||
| 15 | |||||||||||
| 16 | The id of the service this belongs to. | ||||||||||
| 17 | |||||||||||
| 18 | =head2 version | ||||||||||
| 19 | |||||||||||
| 20 | The number of the version this belongs to. | ||||||||||
| 21 | |||||||||||
| 22 | =head2 name | ||||||||||
| 23 | |||||||||||
| 24 | The domain name of this domain | ||||||||||
| 25 | |||||||||||
| 26 | =head2 content | ||||||||||
| 27 | |||||||||||
| 28 | The content of the VCL file. | ||||||||||
| 29 | |||||||||||
| 30 | See this for more details | ||||||||||
| 31 | |||||||||||
| 32 | https://www.varnish-cache.org/trac/wiki/VCL | ||||||||||
| 33 | |||||||||||
| 34 | =head2 comment | ||||||||||
| 35 | |||||||||||
| 36 | a free form comment field | ||||||||||
| 37 | |||||||||||
| 38 | =cut | ||||||||||
| 39 | |||||||||||
| 40 | package Net::Fastly; | ||||||||||
| 41 | |||||||||||
| 42 | # Temporary hack | ||||||||||
| 43 | 0 | ▶ | sub get_vcl { | ||||||||
|
Subroutine
get_vcl: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||
| 44 | 0 | my $self = shift; | |||||||||
| 45 | 0 | my $class = 'Net::Fastly::VCL'; | |||||||||
| 46 | 0 | my $service = shift; | |||||||||
| 47 | 0 | my $version = shift; | |||||||||
| 48 | 0 | my $name = shift; | |||||||||
| 49 | 0 | my %opts = @_; | |||||||||
| 50 | 0 | my $hash = $self->client->_get($class->_get_path($service, $version, $name), %opts); | |||||||||
| 51 | 0 | ▶ | return undef unless $hash; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 52 | 0 | return $class->new($self, %$hash); | |||||||||
| 53 | } | ||||||||||
| 54 | 5 | 1; | |||||||||