AXL-Client-Simple

 view release on metacpan or  search on metacpan

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

# Perl versions (eg, 5.8.1).
sub _version {
	my $s = shift || 0;
	my $d =()= $s =~ /(\.)/g;
	if ( $d >= 2 ) {
		# Normalise multipart versions
		$s =~ s/(\.)(\d{1,3})/sprintf("$1%03d",$2)/eg;
	}
	$s =~ s/^(\d+)\.?//;
	my $l = $1 || 0;
	my @v = map {
		$_ . '0' x (3 - length $_)
	} $s =~ /(\d{1,3})\D?/g;
	$l = $l . '.' . join '', @v if @v;
	return $l + 0;
}

sub _cmp {
	_version($_[1]) <=> _version($_[2]);
}

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


sub _wanted_t {
}

sub tests_recursive {
	my $self = shift;
	my $dir = shift || 't';
	unless ( -d $dir ) {
		die "tests_recursive dir '$dir' does not exist";
	}
	my %tests = map { $_ => 1 } split / /, ($self->tests || '');
	require File::Find;
	File::Find::find(
        sub { /\.t$/ and -f $_ and $tests{"$File::Find::dir/*.t"} = 1 },
        $dir
    );
	$self->tests( join ' ', sort keys %tests );
}

sub write {
	my $self = shift;

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

		my @tests = split ' ', $self->tests;
		my %seen;
		$args->{test} = {
			TESTS => (join ' ', grep {!$seen{$_}++} @tests),
		};
    } elsif ( $Module::Install::ExtraTests::use_extratests ) {
        # Module::Install::ExtraTests doesn't set $self->tests and does its own tests via harness.
        # So, just ignore our xt tests here.
	} elsif ( -d 'xt' and ($Module::Install::AUTHOR or $ENV{RELEASE_TESTING}) ) {
		$args->{test} = {
			TESTS => join( ' ', map { "$_/*.t" } grep { -d $_ } qw{ t xt } ),
		};
	}
	if ( $] >= 5.005 ) {
		$args->{ABSTRACT} = $self->abstract;
		$args->{AUTHOR}   = join ', ', @{$self->author || []};
	}
	if ( $self->makemaker(6.10) ) {
		$args->{NO_META}   = 1;
		#$args->{NO_MYMETA} = 1;
	}

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

	}
	unless ( $self->is_admin ) {
		delete $args->{SIGN};
	}
	if ( $self->makemaker(6.31) and $self->license ) {
		$args->{LICENSE} = $self->license;
	}

	my $prereq = ($args->{PREREQ_PM} ||= {});
	%$prereq = ( %$prereq,
		map { @$_ } # flatten [module => version]
		map { @$_ }
		grep $_,
		($self->requires)
	);

	# Remove any reference to perl, PREREQ_PM doesn't support it
	delete $args->{PREREQ_PM}->{perl};

	# Merge both kinds of requires into BUILD_REQUIRES
	my $build_prereq = ($args->{BUILD_REQUIRES} ||= {});
	%$build_prereq = ( %$build_prereq,
		map { @$_ } # flatten [module => version]
		map { @$_ }
		grep $_,
		($self->configure_requires, $self->build_requires)
	);

	# Remove any reference to perl, BUILD_REQUIRES doesn't support it
	delete $args->{BUILD_REQUIRES}->{perl};

	# Delete bundled dists from prereq_pm, add it to Makefile DIR
	my $subdirs = ($args->{DIR} || []);
	if ($self->bundles) {

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

		if ( $self->makemaker(6.48) ) {
			$args->{MIN_PERL_VERSION} = $perl_version;
		}
	}

	if ($self->installdirs) {
		warn qq{old INSTALLDIRS (probably set by makemaker_args) is overriden by installdirs\n} if $args->{INSTALLDIRS};
		$args->{INSTALLDIRS} = $self->installdirs;
	}

	my %args = map {
		( $_ => $args->{$_} ) } grep {defined($args->{$_} )
	} keys %$args;

	my $user_preop = delete $args{dist}->{PREOP};
	if ( my $preop = $self->admin->preop($user_preop) ) {
		foreach my $key ( keys %$preop ) {
			$args{dist}->{$key} = $preop->{$key};
		}
	}

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

		push @{$self->{values}->{$key}}, @_;
		return $self;
	};
}

foreach my $key ( @resource_keys ) {
	*$key = sub {
		my $self = shift;
		unless ( @_ ) {
			return () unless $self->{values}->{resources};
			return map  { $_->[1] }
			       grep { $_->[0] eq $key }
			       @{ $self->{values}->{resources} };
		}
		return $self->{values}->{resources}->{$key} unless @_;
		my $uri = shift or die(
			"Did not provide a value to $key()"
		);
		$self->resources( $key => $uri );
		return 1;
	};

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

	*$key = sub {
		my $self = shift;
		return $self->{values}->{$key} unless @_;
		my @added;
		while ( @_ ) {
			my $module  = shift or last;
			my $version = shift || 0;
			push @added, [ $module, $version ];
		}
		push @{ $self->{values}->{$key} }, @added;
		return map {@$_} @added;
	};
}

# Resource handling
my %lc_resource = map { $_ => 1 } qw{
	homepage
	license
	bugtracker
	repository
};

sub resources {
	my $self = shift;
	while ( @_ ) {
		my $name  = shift or last;

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

		# The user used ->feature like ->features by passing in the second
		# argument as a reference.  Accomodate for that.
		$mods = $_[0];
	} else {
		$mods = \@_;
	}

	my $count = 0;
	push @$features, (
		$name => [
			map {
				ref($_) ? ( ref($_) eq 'HASH' ) ? %$_ : @$_ : $_
			} @$mods
		]
	);

	return @$features;
}

sub features {
	my $self = shift;

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

		([^\n]*)
		|
		=head \d \s+ (?:licen[cs]e|licensing|copyright|legal)\b \s*
		.*? copyright .*? \d\d\d[\d.]+ \s* (?:\bby\b)? \s*
		([^\n]*)
	/ixms) {
		my $author = $1 || $2;

		# XXX: ugly but should work anyway...
		if (eval "require Pod::Escapes; 1") {
			# Pod::Escapes has a mapping table.
			# It's in core of perl >= 5.9.3, and should be installed
			# as one of the Pod::Simple's prereqs, which is a prereq
			# of Pod::Text 3.x (see also below).
			$author =~ s{ E<( (\d+) | ([A-Za-z]+) )> }
			{
				defined $2
				? chr($2)
				: defined $Pod::Escapes::Name2character_number{$1}
				? chr($Pod::Escapes::Name2character_number{$1})
				: do {
					warn "Unknown escape: E<$1>";
					"E<$1>";
				};
			}gex;
		}
		elsif (eval "require Pod::Text; 1" && $Pod::Text::VERSION < 3) {
			# Pod::Text < 3.0 has yet another mapping table,
			# though the table name of 2.x and 1.x are different.
			# (1.x is in core of Perl < 5.6, 2.x is in core of
			# Perl < 5.9.3)
			my $mapping = ($Pod::Text::VERSION < 2)
				? \%Pod::Text::HTML_Escapes
				: \%Pod::Text::ESCAPES;
			$author =~ s{ E<( (\d+) | ([A-Za-z]+) )> }
			{
				defined $2
				? chr($2)
				: defined $mapping->{$1}
				? $mapping->{$1}
				: do {
					warn "Unknown escape: E<$1>";
					"E<$1>";
				};
			}gex;
		}
		else {
			$author =~ s{E<lt>}{<}g;
			$author =~ s{E<gt>}{>}g;
		}

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


	# Load the advisory META.yml file
	my @yaml = Parse::CPAN::Meta::LoadFile('META.yml');
	my $meta = $yaml[0];

	# Overwrite the non-configure dependency hashes
	delete $meta->{requires};
	delete $meta->{build_requires};
	delete $meta->{recommends};
	if ( exists $val->{requires} ) {
		$meta->{requires} = { map { @$_ } @{ $val->{requires} } };
	}
	if ( exists $val->{build_requires} ) {
		$meta->{build_requires} = { map { @$_ } @{ $val->{build_requires} } };
	}

	return $meta;
}

1;

lib/AXL/Client/Simple/LineResultSet.pm  view on Meta::CPAN

    is => 'ro',
    isa => 'ArrayRef[AXL::Client::Simple::Line]',
    required => 1,
);

sub BUILDARGS {
    my ($class, @rest) = @_; 
    my $params = (scalar @rest == 1 ? $rest[0] : {@rest});

    # promote hashes returned from CUCM into Line objects
    $params->{items} = [ map { AXL::Client::Simple::Line->new($_) }
                             @{$params->{items}} ];
    return $params;
}

sub count {
    my $self = shift;
    return scalar @{$self->items};
}

has iterator => (

lib/AXL/Client/Simple/Phone.pm  view on Meta::CPAN


has lines => (
    is => 'ro',
    isa => 'AXL::Client::Simple::LineResultSet',
    lazy_build => 1,
);

sub _build_lines {
    my $self = shift;

    my @lines = map { { stash => $_ } }
                map { defined $_ ? $_ : () }
                map { $_->{'parameters'}->{'return'}->{'directoryNumber'} }
                map { $self->client->getLine->(uuid => $_) }
                map { $_->{'dirn'}->{'uuid'} }
                    @{ $self->stash->{'lines'}->{'line'} || [] };

    return AXL::Client::Simple::LineResultSet->new({items => \@lines});
}

__PACKAGE__->meta->make_immutable;
no Moose;
1;

__END__

share/AXLSoap.xsd  view on Meta::CPAN

							</xsd:sequence>
						</xsd:sequence>
					</xsd:complexType>
				</xsd:element>
			</xsd:choice>
		</xsd:sequence>
		<xsd:attribute name="uuid" type="axlapi:XUUID"/>
	</xsd:complexType>
	<xsd:complexType name="XRouteListMember">
		<xsd:annotation>
			<xsd:documentation>Represents a mapping between route groups and route lists.</xsd:documentation>
		</xsd:annotation>
		<xsd:sequence minOccurs="0">
			<xsd:choice>
				<xsd:element name="routeGroup" type="axlapi:XRouteGroup">
					<xsd:annotation>
						<xsd:documentation>Only the uuid attribute is read by the AXL API.</xsd:documentation>
					</xsd:annotation>
				</xsd:element>
				<xsd:element name="routeGroupName" type="axlapi:String50" nillable="false"/>
			</xsd:choice>

share/AXLSoap.xsd  view on Meta::CPAN

			<xsd:element name="useFullyQualifiedCallingPartyNumber" type="xsd:string"/><!--This field is of the type axl:XStatus in AXLEnums.xsd-->
			<xsd:element name="callingPartyNumberingPlan" type="xsd:string" nillable="false" minOccurs="0"/><!--This field is of the type axl:XNumberingPlan in AXLEnums.xsd-->
			<xsd:element name="callingPartyNumberType" type="xsd:string" nillable="false" minOccurs="0"/><!--This field is of the type axl:XPriOfNumber in AXLEnums.xsd-->
			<xsd:element name="calledPartyNumberingPlan" type="xsd:string" nillable="false" minOccurs="0"/><!--This field is of the type axl:XNumberingPlan in AXLEnums.xsd-->
			<xsd:element name="calledPartyNumberType" type="xsd:string" nillable="false" minOccurs="0"/><!--This field is of the type axl:XPriOfNumber in AXLEnums.xsd-->
		</xsd:sequence>
		<xsd:attribute name="uuid" type="axlapi:XUUID"/>
	</xsd:complexType>
	<xsd:complexType name="XHuntListMember">
		<xsd:annotation>
			<xsd:documentation>Represents a mapping between line groups and hunt lists.</xsd:documentation>
		</xsd:annotation>
		<xsd:sequence minOccurs="0">
			<xsd:choice>
				<xsd:element name="lineGroup" type="axlapi:XLineGroup">
					<xsd:annotation>
						<xsd:documentation>Only the uuid attribute is read by the AXL API.</xsd:documentation>
					</xsd:annotation>
				</xsd:element>
				<xsd:element name="lineGroupName" type="axlapi:String50" nillable="false"/>
			</xsd:choice>

share/AXLSoap.xsd  view on Meta::CPAN

         <xsd:enumeration value="Attempt to update a standard template is denied; can only update a derived template"/>
         <xsd:enumeration value="Can not assign the same softkey to the same call state for one softkey template except the Undefined softkey"/>
         <xsd:enumeration value="Attempt to delete CallManagerGroup record defined as the default tftp record"/>
         <xsd:enumeration value="Invalid attempt to change status of CallManagerGroup default tftp record to non-default"/>
         <xsd:enumeration value="Failure in triggered insert into SoftkeyTemplateServiceMap during insert of a new SoftkeyTemplate"/>
         <xsd:enumeration value="Encountered malformed base template record when attempting to insert a new Softkey Template"/>
         <xsd:enumeration value="Attempt to update a Standard template denied. Only user-defined templates may be updated"/>
         <xsd:enumeration value="Attempt to delete a Standard template denied. Only user-defined templates may be delete"/>
         <xsd:enumeration value="Attempt to insert a Standard template denied. Only user-defined templates may be inserted"/>
         <xsd:enumeration value="Invalid internal key encountered attempting to insert user template"/>
         <xsd:enumeration value="Cannot map this Service to a Softkey Template because the Service has no Softkeys defined."/>
         <xsd:enumeration value="Cannot remove the Cisco CallManager softkeys from a Softkey Template."/>
         <xsd:enumeration value="You cannot delete this SoftKey Template because it is the default SoftKey Template."/>
         <xsd:enumeration value="Failure in triggered insert of new record(s) into SoftkeySet during insert of new SoftkeyTemplateServiceMap record"/>
         <xsd:enumeration value="Attempt to delete a Standard template denied. Only user-defined templates may be deleted"/>
         <xsd:enumeration value="Attempt to directly delete last service for this user template from SoftkeyTemplateServiceMap table denied"/>
         <xsd:enumeration value="Attempt to delete CallManager service denied. CallManager is an essential service"/>
         <xsd:enumeration value="Failure attempting to update the Qsig value in RouteGroup"/>
         <xsd:enumeration value="Cannot mix H323 or Mixed Non-QSIG with PRI QSIG"/>
         <xsd:enumeration value="Invalid Qsig configuration: at least one QSIG variety must be declared"/>
         <xsd:enumeration value="The selected device or pattern is already associated with a Route Pattern"/>
         <xsd:enumeration value="Only individual ports or the whole GW can be assigned to a Route Group. Not both."/>
         <xsd:enumeration value="Failure attempting to update a device QSIG type value"/>
         <xsd:enumeration value="No such route group defined for this route list"/>
         <xsd:enumeration value="No such device defined for this route list"/>
         <xsd:enumeration value="An invalid QSIG configuration was detected for this Route List"/>
         <xsd:enumeration value="User attempted delete of a mapped RouteList entry not allowed. Must delete the Device from the Device table"/>
         <xsd:enumeration value="RouteList table may only reference Route List devices"/>
         <xsd:enumeration value="HuntList table may only reference Hunt List devices"/>
         <xsd:enumeration value="Digit discard instruction in a Route List, needs that its Dial Plan match that of the corresponding Device"/>
         <xsd:enumeration value="Failure attempting automatic insert of Process Node Service records occuring on insert of Process Node record"/>
         <xsd:enumeration value="An IP address from input or from a resolved host name is already in use"/>
         <xsd:enumeration value="Encountered an invalid hostname: Server name can be an IP address or hostname. Hostname must be at least 2 characters and no more than 63,should contains only letters, numbers,dots and dashes,and end with only a lette...
         <xsd:enumeration value="Encountered an invalid IP address"/>
         <xsd:enumeration value="Invalid IPv4 address format: requires 4 octets separated by periods"/>
         <xsd:enumeration value="The publisher sever entry cannot be deleted"/>
         <xsd:enumeration value="Max number of servers in cluster has been exceeded for install type."/>

share/AXLSoap.xsd  view on Meta::CPAN

         <xsd:enumeration value="AllocatedLicenseUnits is reserved for future use. It must be set to 0 and cannot be updated"/>
         <xsd:enumeration value="Only characters A-Z, a-z, 0-9 are allowed in prompt name"/>
         <xsd:enumeration value="Invalid IP address"/>
         <xsd:enumeration value="There cannot be more than 8 NTP entries for the same Date Time Group"/>
         <xsd:enumeration value="IP address out of range; addresses must be less than 255.255.255.255"/>
         <xsd:enumeration value="7905/12 Dial Rule Pattern contains invalid characters."/>
         <xsd:enumeration value="7960/40/Other Dial Rule Pattern contains invalid characters."/>
         <xsd:enumeration value="Not a valid parameter for 7905/12 Dial Rule (only patterns allowed)"/>
         <xsd:enumeration value="The specified SIP Realm already exists."/>
         <xsd:enumeration value="This instance is configured as a service parameter and cannot be deleted"/>
         <xsd:enumeration value="This Instance ID already exists in Application or End User CAPF mapping"/>
         <xsd:enumeration value="Cannot delete the last Application User from the Standard CCM Super Users group. This group must contain at least one Application User."/>
         <xsd:enumeration value="Cannot remove the last Application User from the Standard CCM Super Users group. This group must contain at least one Application User."/>
         <xsd:enumeration value="Roles for a standard user group cannot be added, modified or deleted."/>
         <xsd:enumeration value="The Resources for a standard role cannot be added, modified or deleted."/>
         <xsd:enumeration value="Model/device protocol does not support security encryption"/>
         <xsd:enumeration value="Model/device protocol does not support authentication"/>
         <xsd:enumeration value="TLS and UDP/TCP ports cannot be shared"/>
         <xsd:enumeration value="Phone Security Profiles cannot be nonsecure and use TLS"/>
         <xsd:enumeration value="Phone Security Profiles that are Authenticated or Encrypted must use TLS"/>
         <xsd:enumeration value="Trunk Security Profiles Incoming Transport Type must use TLS or TCP+UDP"/>

share/AXLSoap.xsd  view on Meta::CPAN

         <xsd:enumeration value="Cannot use RFC4412 reserved names WPS, ETS, and Q735 for namespaces."/>
         <xsd:enumeration value="Cannot remove ResourcePriorityDefaultNamespace if there are namespaces defined."/>
         <xsd:enumeration value="System Time Schedule can only use system time period."/>
         <xsd:enumeration value="Published time schedule can only use published time period."/>
         <xsd:enumeration value="End User can only use his own time period or published system time period."/>
         <xsd:enumeration value="Cannot modify the members of All the time Schedule."/>
         <xsd:enumeration value="Cannot associate an EndUser TimePeriod with more than one TimeSchedule. Create new TimePeriods for each TimeSchedule."/>
         <xsd:enumeration value="End user for TODAccess and CallerFilterList must match."/>
         <xsd:enumeration value="End user for TimeSchedule and TODAccess must match."/>
         <xsd:enumeration value="Time schedule must be unique for each ToDAccess Setting."/>
         <xsd:enumeration value="Invalid IPv6 name: Valid values include IPv6 address excluding link local, site local, IPv4 mapped/compatible or unspecified. Hostname must be 2 to 63 letters, numbers, dots and dashes. Hostname must end with an alpha...
         <xsd:enumeration value="Encountered invalid IPv6 address: Value can be valid IPv6 address and it can not be link local, site local, IPv4 mapped, IPv4 compatible or unspecified IPv6 address."/>
         <xsd:enumeration value="Encountered link local IPv6 address. Value can be valid IPv6 address and it can not be link local, site local, IPv4 mapped, IPv4 compatible or unspecified IPv6 address."/>
         <xsd:enumeration value="Encountered site local IPv6 address. Value can be valid IPv6 address and it can not be link local, site local, IPv4 mapped, IPv4 compatible or unspecified IPv6 address."/>
         <xsd:enumeration value="Encountered IPv4 mapped IPv6 address. Value can be valid IPv6 address and it can not be link local, site local, IPv4 mapped, IPv4 compatible or unspecified IPv6 address."/>
         <xsd:enumeration value="Encountered IPv4 compatible IPv6 address. Value can be valid IPv6 address and it can not be link local, site local, IPv4 mapped, IPv4 compatible or unspecified IPv6 address."/>
         <xsd:enumeration value="Encountered unspecified IPv6 address. Value can be valid IPv6 address and it can not be link local, site local, IPv4 mapped, IPv4 compatible or unspecified IPv6 address."/>
         <xsd:enumeration value="Encountered IPv4 value: Value can be IPv6 address or hostname. Hostname must be at least 2 characters and no more than 63,should contains only letters, numbers,dots and dashes,and end with only a letter or number. Val...
         <xsd:enumeration value="Invalid IPv6 destination address: Valid values include IPv6 address excluding link local, site local, IPv4 mapped/compatible or unspecified. Hostname must be 2 to 63 letters, numbers, dots and dashes. Hostname must en...
         <xsd:enumeration value="Before CUPC can be enabled for a user, CUPS must be enabled"/>
         <xsd:enumeration value="Before CUPS can be disabled for a user, CUPC must be disabled"/>
         <xsd:enumeration value="Cannot delete or modify Unspecified GeoLocation Record"/>
         <xsd:enumeration value="DO NOT USE ERROR NUMBERS BEYOND THIS LIMIT"/>
      </xsd:restriction>
   </xsd:simpleType>

   <xsd:simpleType name="XDeviceFeature">
      <xsd:restriction base="xsd:string">
         <xsd:enumeration value="Presence Status Report"/>

share/AXLSoap.xsd  view on Meta::CPAN

      <xsd:restriction base="xsd:string">
         <xsd:enumeration value="No Rollover"/>
         <xsd:enumeration value="Rollover Within Same DN"/>
         <xsd:enumeration value="Rollover to any line"/>
      </xsd:restriction>
   </xsd:simpleType>

   <xsd:simpleType name="XPRIChanIE">
      <xsd:restriction base="xsd:string">
         <xsd:enumeration value="Timeslot Number"/>
         <xsd:enumeration value="Slotmap"/>
         <xsd:enumeration value="Use Number when 1B"/>
         <xsd:enumeration value="Continuous Number"/>
      </xsd:restriction>
   </xsd:simpleType>

   <xsd:simpleType name="XPacketCaptureMode">
      <xsd:restriction base="xsd:string">
         <xsd:enumeration value="None"/>
         <xsd:enumeration value="Batch Processing Mode"/>
      </xsd:restriction>



( run in 1.210 second using v1.01-cache-2.11-cpan-140bd7fdf52 )