Result:
found more than 419 distributions - search limited to the first 2001 files matching your query ( run in 0.441 )


CGI-Wiki-Plugin-Locator-Grid

 view release on metacpan or  search on metacpan

lib/CGI/Wiki/Plugin/Locator/Grid.pm  view on Meta::CPAN

				     unit    => "kilometres" );

Defaults to metres if C<unit> is not supplied or is not recognised.
Recognised units at the moment: C<metres>, C<kilometres>.

Returns C<undef> if one of the endpoints does not exist, or does not
have both co-ordinates defined. The C<node> specification of an
endpoint overrides the x/y co-ords if both specified (but don't do
that).

B<Note:> Works to the nearest metre. Well, actually, calls C<int> and
rounds down, but if anyone cares about that they can send a patch.

 view all matches for this distribution


CGI-Wiki-Plugin-Locator-UK

 view release on metacpan or  search on metacpan

lib/CGI/Wiki/Plugin/Locator/UK.pm  view on Meta::CPAN

				    unit      => "metres" );

Defaults to kilometres if C<unit> is not supplied or is not recognised.
Recognised units at the moment: C<metres>, C<kilometres>.

Returns C<undef> if one of the endpoints does not exist, or does not
have both co-ordinates defined. The C<node> specification of an
endpoint overrides the x/y co-ords if both specified (but don't do
that).

B<Note:> Works to the nearest metre. Well, actually, calls C<int> and
rounds down, but if anyone cares about that they can send a patch.

 view all matches for this distribution


CGI-Wiki-Plugin-Locator-UTM

 view release on metacpan or  search on metacpan

lib/CGI/Wiki/Plugin/Locator/UTM.pm  view on Meta::CPAN

				    unit      => "metres" );

Defaults to kilometres if C<unit> is not supplied or is not recognised.
Recognised units at the moment: C<metres>, C<kilometres>.

Returns C<undef> if one of the endpoints does not exist, or does not
have both co-ordinates defined. 

B<Note:> Works to the nearest metre. Well, actually, calls C<int> and
rounds down, but if anyone cares about that they can send a patch.

 view all matches for this distribution


CPAN-Common-Index

 view release on metacpan or  search on metacpan

lib/CPAN/Common/Index/MetaDB.pm  view on Meta::CPAN

use CPAN::Meta::YAML;
use HTTP::Tiny;

#pod =attr uri
#pod
#pod A URI for the endpoint of a CPAN MetaDB server. The
#pod default is L<http://cpanmetadb.plackperl.org/v1.0/>.
#pod
#pod =cut

sub BUILD {

lib/CPAN/Common/Index/MetaDB.pm  view on Meta::CPAN


=head1 ATTRIBUTES

=head2 uri

A URI for the endpoint of a CPAN MetaDB server. The
default is L<http://cpanmetadb.plackperl.org/v1.0/>.

=for Pod::Coverage attributes validate_attributes search_packages search_authors BUILD

=head1 AUTHOR

 view all matches for this distribution


CPAN-Faker-HTTPD

 view release on metacpan or  search on metacpan

lib/CPAN/Faker/HTTPD.pm  view on Meta::CPAN

);

has 'httpd' => (
    is      => 'ro',
    isa     => 'Test::Fake::HTTPD',
    handles => [qw(port host_post endpoint)],
    default => sub { Test::Fake::HTTPD->new },
);

has 'server' => (
    is      => 'ro',

lib/CPAN/Faker/HTTPD.pm  view on Meta::CPAN

  use LWP::Simple;

  my $cpan = CPAN::Faker::HTTPD->new({ source => './eg' });
  $cpan->make_cpan;

  my $uri = $cpan->endpoint;
  $uri->path( '/authors/id/P/PS/PSHANGOV/Miril-0.008.tar.gz' );

  my $content = LWP::Simple::get( $uri );

$cpan->make_cpan;

lib/CPAN/Faker/HTTPD.pm  view on Meta::CPAN


Host and port of the running server.

See L<Test::Fake::HTTPD> for details.

=head2 endpoint

L<URI> object for the full address of the running server (e.g.
C<http://127.0.0.1:{port}>).

See L<Test::Fake::HTTPD> for details.

 view all matches for this distribution


CPAN-IndexPod

 view release on metacpan or  search on metacpan

t/unpacked/GraphViz/lib/GraphViz.pm  view on Meta::CPAN


sets the arrow direction. Can be one of: 'forward', 'back', 'both',  'none'

=item tailclip, headclip

when set to false disables endpoint shape clipping

=item arrowhead, arrowtail

sets the type for the arrow head or tail. Can be one of: 'none',
'normal', 'inv', 'dot', 'odot', 'invdot', 'invodot.'

 view all matches for this distribution


CPAN-Local-Plugin-DistroList

 view release on metacpan or  search on metacpan

t/distrolist.t  view on Meta::CPAN


for ( '0.01', '0.02') {
    my $path = sprintf $distro_path_tmpl, $_;

    # uris
    my $uri  = $fakepan->endpoint;
    $uri->path($path);
    push @fake_distro_uris, $uri->as_string;

    # paths
    my $source = file($fakepan->dest, $path)->stringify;

 view all matches for this distribution


CPAN-Local

 view release on metacpan or  search on metacpan

t/distribution.t  view on Meta::CPAN


$fakepan->$_ for qw(_update_author_checksums write_package_index
                 write_author_index write_modlist_index write_perms_index);

my $distro_path = 'authors/id/L/LO/LOCAL/Foo-Bar-0.01.tar.gz';
my $distro_uri = $fakepan->endpoint;
$distro_uri->path($distro_path);
$distro_uri = $distro_uri->as_string;

$distro{uri} = $distribution_class->new( uri => $distro_uri );

 view all matches for this distribution


CPAN-Meta-Requirements

 view release on metacpan or  search on metacpan

t/basic.t  view on Meta::CPAN

  is_deeply(
    $req->as_string_hash,
    {
      Foo => '> 1, <= 2',
    },
    "we can exclude an endpoint",
  );
}

{
  my $req = CPAN::Meta::Requirements->new;

 view all matches for this distribution


CPAN-Testers-API

 view release on metacpan or  search on metacpan

CHANGES  view on Meta::CPAN


    [Fixed]

    - Upgraded Mojolicious::Plugin::OpenAPI to 1.13 to fix deprecations
      due to Mojo::File
    - Fixed API website links to point to /v3 API endpointes
    - Fixed test report post to use new schema with auto-serialization.
      This makes our database more consistent.

0.007     2017-05-12 10:35:47+02:00 Europe/Paris

CHANGES  view on Meta::CPAN

    - /uploads API for querying the CPAN uploads information table. See
      http://api.cpantesters.org/docs/?url=/v1#!/default/uploads for
      details.

    - Upload feeds to get push notifications of new CPAN uploads via
      WebSockets. Subscribe to any /uploads endpoint to get a feed of
      new information from that endpoint.

0.003     2016-11-26 21:10:39-06:00 America/Chicago

    [Added]

 view all matches for this distribution


CPAN

 view release on metacpan or  search on metacpan

Todo  view on Meta::CPAN


	* SAVA/Encode-IMAPUTF7-1.00.tar.gz candidate for binary search? 23023
	fails also. 20002 doesn't fail. After many hours we reach the interval
	between 22774 and 22872 and we need to build new perls again.

	Before we reach the endpoint I already see that the test output has
	already changed somewhere, so maybe we need more binary searches. The
	failure @22842 looks so simple:

t/0-test....Modification of a read-only value attempted at /home/sand/.cpan/build/Encode-IMAPUTF7-1.00/blib/lib/Encode/IMAPUTF7.pm line 39.
# Looks like your test died before it could output anything.

 view all matches for this distribution


CPU-Z80-Disassembler

 view release on metacpan or  search on metacpan

t/data/zx48.asm  view on Meta::CPAN

; continue if a match of all eight bytes was found

        POP     BC              ; discard the
        POP     BC              ; saved
        POP     BC              ; pointers
        LD      A,$80           ; the endpoint of character set
        SUB     B               ; subtract the counter
                                ; to give the code 32-127
        LD      BC,$0001        ; make one space in workspace.

        RST     30H             ; BC-SPACES creates the space sliding

 view all matches for this distribution


CSS-Inliner

 view release on metacpan or  search on metacpan

t/embedded_style_block.t  view on Meta::CPAN


eval {
  $inliner->fetch_file({ url => $test_url });
};

## conditional test plan based on whether or not the endpoint can be reached - frequently can't by cpan testers
plan $@ ? (skip_all => 'Connectivity for endpoint required for test cannot be established') : (tests => 2);

my $inlined = $inliner->inlinify();

ok($inlined eq $correct_result, 'result was correct');

 view all matches for this distribution


CWB

 view release on metacpan or  search on metacpan

t/33_cqp_errors.t  view on Meta::CPAN

for my $R (-1, -2, -42) { # T6–T8
  syntax_error("A = 'the' []{$R} 'elephant'", "negative repetition count {$R}", qr/non-negative/i);
}

for my $R (-1, -2) { # T9–T10
  syntax_error("A = 'the' []{0,$R} 'elephant'", "invalid endpoint of repetition range {0,$R}", qr/non-negative/i);
}

for my $R (1, 2, 3) { # T11–T13
  my $R1 = $R - 1;
  syntax_error("A = 'the' []{$R,$R1} 'elephant'", "invalid repetition range {$R,$R1}", qr/invalid.*range/i);

t/33_cqp_errors.t  view on Meta::CPAN

for my $R (-1, -2, -42) { # T14–T16
  syntax_error("A = TAB 'the' []{$R} 'elephant'", "negative distance {$R} in TAB query", qr/non-negative/i);
}

for my $R (-1, -2) { # T17–T18
  syntax_error("A = TAB 'the' []{0,$R} 'elephant'", "invalid endpoint of distance range {0,$R} in TAB query", qr/non-negative/i);
}

for my $R (-1, -2) { # T19–T20
  syntax_error("A = TAB 'the' []{,$R} 'elephant'", "invalid endpoint of distance range {,$R} in TAB query", qr/non-negative|invalid.*range/i);
}

for my $R (1, 2, 3) { # T21–T23
  my $R1 = $R - 1;
  syntax_error("A = TAB 'the' []{$R,$R1} 'elephant'", "invalid distance range ($R,$R1) in TAB query", qr/invalid.*range/i);

 view all matches for this distribution


CXC-Form-Tiny-Plugin-OptArgs2

 view release on metacpan or  search on metacpan

t/OptArgs.t  view on Meta::CPAN

        type    => Str,
        default => sub { 'https://cda.cfa.harvard.edu/csc2tap' },
    );

    option(
        comment      => 'CSC TAP endpoint',
        isa_name     => 'URL',
        show_default => 1,
    );

    form_field 'output.file' => ( type => Path, coerce => 1 );

 view all matches for this distribution


CaCORE

 view release on metacpan or  search on metacpan

examples/EVStest.pl  view on Meta::CPAN


#
# ApplicationService is a utility classs that encapsulates webservice invocation to caCORE server.
# ApplicationService object follows the Singleton pattern, in that each program will ONLY contain one instance
# of such class.
# The URL being passed to the intance method is the service endpoint of the caCORE webservice.
# If no such URL is provided in the program, it will default to the caCORE production server, "http://cabio.nci.nih.gov/cacore30/ws/caCOREService"
#
my $appsvc = CaCORE::ApplicationService->instance("http://cabio.nci.nih.gov/cacore32/ws/caCOREService");

my $num2 = 0;

 view all matches for this distribution


Cache-Elasticache-Memcache

 view release on metacpan or  search on metacpan

lib/Cache/Elasticache/Memcache.pm  view on Meta::CPAN

=head1 SYNOPSIS

    use Cache::Elasticache::Memcache;

    my $memd = new Cache::Elasticache::Memcache->new({
        config_endpoint => 'foo.bar',
        update_period => 180,
        # All other options are passed on to Cache::Memcached::Fast
        ...
    });

    # Will update the server list from the configuration endpoint
    $memd->updateServers();

    # Will update the serverlist from the configuration endpoint if the time since
    # the last time the server list was checked is greater than the update period
    # specified when the $memd object was created.
    $memd->checkServers();

    # Class method to retrieve a server list from a configuration endpoint.
    Cache::Elasticache::Memcache->getServersFromEndpoint('foo.bar');

    # All other supported methods are handled by Cache::Memcached::Fast

    # N.B. This library is currently under development

=head1 DESCRIPTION

A wrapper for L<Cache::Memacached::Fast> with support for AWS's auto reconfiguration mechanism. It makes use of an AWS elasticache memcached cluster's configuration endpoint to discover the memcache servers in the cluster and periodically check the c...

=head1 UNDER DEVELOPMENT DISCALIMER

N.B. This module is still under development. It should work, but things may change under the hood. I plan to imporove the resiliance with better timeout handling of communication when updating the server list. I'm toying with the idea of making the s...

lib/Cache/Elasticache/Memcache.pm  view on Meta::CPAN

=pod

=head1 CONSTRUCTOR

    Cache::Elasticache::Memcache->new({
        config_endpoint => 'foo.bar',
        update_period => 180,
        ...
    })

=head2 Constructor parameters

=over

=item config_endpoint

AWS elasticache memcached cluster config endpoint location

=item update_period

The minimum period (in seconds) to wait between updating the server list. Defaults to 180 seconds

lib/Cache/Elasticache/Memcache.pm  view on Meta::CPAN

    my ($conf) = @_;
    my $self = bless {}, $class;

    my $args = (@_ == 1) ? shift : { @_ };  # hashref-ify args

    croak "config_endpoint must be speccified" if (!defined $args->{'config_endpoint'});
    croak "servers is not a valid constructors parameter" if (defined $args->{'servers'});

    $self->{'config_endpoint'} = delete @{$args}{'config_endpoint'};

    $args->{servers} = $self->getServersFromEndpoint($self->{'config_endpoint'}) if(defined $self->{'config_endpoint'});
    $self->{_last_update} = time;

    $self->{update_period} = exists $args->{update_period} ? $args->{update_period} : 180;

    $self->{'_args'} = $args;

lib/Cache/Elasticache/Memcache.pm  view on Meta::CPAN

=pod

=item checkServers

    my $memd = Cache::Elasticache::Memcache->new({
        config_endpoint => 'foo.bar'
    })

    ...

    $memd->checkServers();

lib/Cache/Elasticache/Memcache.pm  view on Meta::CPAN

=cut

sub checkServers {
    my $self = shift;
    $self->{_current_update_period} = (defined $self->{_current_update_period}) ? $self->{_current_update_period}: $self->{update_period} - rand(10);
    if ( defined $self->{'config_endpoint'} && (time - $self->{_last_update}) > $self->{_current_update_period} ) {
        $self->updateServers();
        $self->{_current_update_period} = undef;
    }
}

=pod

=item updateServers

    my $memd = Cache::Elasticache::Memcache->new({
        config_endpoint => 'foo.bar'
    })

    ...

    $memd->updateServers();

lib/Cache/Elasticache/Memcache.pm  view on Meta::CPAN

=cut

sub updateServers {
    my $self = shift;

    my $servers = $self->getServersFromEndpoint($self->{'config_endpoint'});

    ## Cache::Memcached::Fast does not support updating the server list after creation
    ## Therefore we must create a new object.

    if ( $self->_hasServerListChanged($servers) ) {

lib/Cache/Elasticache/Memcache.pm  view on Meta::CPAN


=item getServersFromEndpoint

    Cache::Elasticache::Memcache->getServersFromEndpoint('foo.bar');

This class method will retrieve the server list for a given configuration endpoint.

=cut

sub getServersFromEndpoint {
    my $invoker = shift;
    my $config_endpoint = shift;
    my $data = "";
    # TODO: make use of "connect_timeout" (default 0.5s) and "io_timeout" (default 0.2s) constructor parameters
    # my $args = shift;
    # $connect_timeout = exists $args->{connect_timeout} ? $args->{connect_timeout} : $class::default_connect_timeout;
    # $io_timeout = exists $args->{io_timeout} ? $args->{io_timeout} : $class::default_io_timeout;
    my $socket = (blessed($invoker)) ? $invoker->{_sockets}->{$config_endpoint} : undef;

    for my $i (0..2) {
        unless (defined $socket && $socket->connected()) {
            $socket = IO::Socket::IP->new(PeerAddr => $config_endpoint, Timeout => 10, Proto => 'tcp');
            croak "Unable to connect to server: ".$config_endpoint." - $!" unless $socket;
            $socket->sockopt(SO_KEEPALIVE,1);
            $socket->autoflush(1);
            IO::Socket::Timeout->enable_timeouts_on($socket);
            $socket->read_timeout(0.5);
# This is currently commented out as it was breaking under perl 5.24 for me. Need to investigate!

lib/Cache/Elasticache/Memcache.pm  view on Meta::CPAN

        } else {
            $socket = undef;
        }
    }
    if (blessed $invoker) {
        $invoker->{_sockets}->{$config_endpoint} = $socket;
    } else {
        $socket->close() if (blessed $socket);
    }
    return $invoker->_parseConfigResponse($data);
}

lib/Cache/Elasticache/Memcache.pm  view on Meta::CPAN

    return \@servers;
}

sub DESTROY {
    my $self = shift;
    foreach my $config_endpoint (keys %{$self->{_sockets}}) {
        my $socket = $self->{_sockets}->{$config_endpoint};
        if (defined $self->{_socket} && $socket->connected()) {
            $self->{_socket}->close();
        }
    }
};

 view all matches for this distribution


Cache-RamDisk

 view release on metacpan or  search on metacpan

lib/Cache/RamDisk.pm  view on Meta::CPAN

1. Message queues are extremely fast, but extremely limited too.

2. Shared memory is perhaps even faster, but it came out for me to be an at least hairy problem
trying to store several references all in one segment.

3. Sockets are reliable, but require a second communication endpoint and yet another server process.

But a file is a file is a file.

The package collects as much ramdisks to a bundle as possible and necessary to hold the required user space,
depending on the respective parameters under which the system's individual kernel had been compiled.

 view all matches for this distribution


Calendar-Japanese-Acme-Syukujitsu

 view release on metacpan or  search on metacpan

lib/Calendar/Japanese/Acme/Syukujitsu.pm  view on Meta::CPAN


sub new {
    args
        my $class,
        my $cachefile => {optional => 1},
        my $endpoint => {optional => 1};

    my $data;
    if ($cachefile) {
        $data = read_file($cachefile);
    } else {
        $endpoint = $endpoint || $DEFAULT_ENDPOINT;
        $data = Furl->new()->get($endpoint)->content;
    }
    Encode::from_to($data, 'sjis', 'utf-8');

    my $syukujitsus = {};
    for my $line (split /\n/, $data) {

lib/Calendar/Japanese/Acme/Syukujitsu.pm  view on Meta::CPAN

F<syukujitsu.csv> that published by Japanese government.
With interface that referenced to C<Calendar::Japanese::Holiday>.

=head1 METHODS

=head2 new([cachefile => $cachefile][endpoint => $endpoint])
Constructor.

=head2 get_syukujitsus(year => $year [, month => $month [, day => $day]])

=head2 is_syukujitsu(year => $year, month => $month, day => $day)

 view all matches for this distribution


Cassandra-Lite

 view release on metacpan or  search on metacpan

lib/Cassandra/Types.pm  view on Meta::CPAN

package Cassandra::TokenRange;
BEGIN {
  $Cassandra::TokenRange::VERSION = '0.4.0';
}
use base qw(Class::Accessor);
Cassandra::TokenRange->mk_accessors( qw( start_token end_token endpoints ) );

sub new {
  my $classname = shift;
  my $self      = {};
  my $vals      = shift || {};
  $self->{start_token} = undef;
  $self->{end_token} = undef;
  $self->{endpoints} = undef;
  if (UNIVERSAL::isa($vals,'HASH')) {
    if (defined $vals->{start_token}) {
      $self->{start_token} = $vals->{start_token};
    }
    if (defined $vals->{end_token}) {
      $self->{end_token} = $vals->{end_token};
    }
    if (defined $vals->{endpoints}) {
      $self->{endpoints} = $vals->{endpoints};
    }
  }
  return bless ($self, $classname);
}

lib/Cassandra/Types.pm  view on Meta::CPAN

      }
      last; };
      /^3$/ && do{      if ($ftype == TType::LIST) {
        {
          my $_size35 = 0;
          $self->{endpoints} = [];
          my $_etype38 = 0;
          $xfer += $input->readListBegin(\$_etype38, \$_size35);
          for (my $_i39 = 0; $_i39 < $_size35; ++$_i39)
          {
            my $elem40 = undef;
            $xfer += $input->readString(\$elem40);
            push(@{$self->{endpoints}},$elem40);
          }
          $xfer += $input->readListEnd();
        }
      } else {
        $xfer += $input->skip($ftype);

lib/Cassandra/Types.pm  view on Meta::CPAN

  if (defined $self->{end_token}) {
    $xfer += $output->writeFieldBegin('end_token', TType::STRING, 2);
    $xfer += $output->writeString($self->{end_token});
    $xfer += $output->writeFieldEnd();
  }
  if (defined $self->{endpoints}) {
    $xfer += $output->writeFieldBegin('endpoints', TType::LIST, 3);
    {
      $xfer += $output->writeListBegin(TType::STRING, scalar(@{$self->{endpoints}}));
      {
        foreach my $iter41 (@{$self->{endpoints}}) 
        {
          $xfer += $output->writeString($iter41);
        }
      }
      $xfer += $output->writeListEnd();

 view all matches for this distribution


Catalyst-Action-REST

 view release on metacpan or  search on metacpan

t/catalyst-action-rest-action-dispatch.t  view on Meta::CPAN

# Should use the default serializer, YAML
my $t = Test::Rest->new( 'content_type' => 'text/plain' );

use_ok 'Catalyst::Test', 'Test::Catalyst::Action::REST';

foreach my $endpoint (qw/ test other_test /) {
    foreach my $method (qw(GET DELETE POST PUT OPTIONS)) {
        my $run_method = lc($method);
        my $res;
        if ( grep /$method/, qw(GET DELETE OPTIONS) ) {
            $res = request( $t->$run_method( url => '/actions/' . $endpoint ) );
        }
        else {
            $res = request(
                $t->$run_method(
                    url  => '/actions/' . $endpoint,
                    data => '',
                )
            );
        }
        ok( $res->is_success, "$method request succeeded" ) or warn Dumper($res);

 view all matches for this distribution


Catalyst-ActionRole-DetachOnDie

 view release on metacpan or  search on metacpan

t/lib/Foo/Controller/Root.pm  view on Meta::CPAN

  push @{$c->stash->{body}}, 'explicit_detach';
  $c->res->redirect('/success');
  $c->detach;
}

sub explicit_detach_endpoint : Chained('explicit_detach') PathPart('endpoint') Args(0) {
  my($self, $c) = @_;
  push @{$c->stash->{body}}, 'endpoint';
  return;
}

sub pitch_go : Chained('base') Args(0) ActionClass('DetachOnDie') {
    my ( $self, $c ) = @_;

 view all matches for this distribution


Catalyst-ActionRole-Tabs

 view release on metacpan or  search on metacpan

lib/Catalyst/ActionRole/Tabs.pm  view on Meta::CPAN

  [% END %]
  </ul>

=head1 DESCRIPTION

This module allows to add 'Tab' attributes to action endpoints, and it
will automatically build a data structure suitable for rendering 'tabs'
to switch between the methods that share the same tab structure.

Although this was originally built to help with making tabbed interfaces,
it isn't limited to creating tabs, as it simply collects the information

 view all matches for this distribution


Catalyst-Authentication-Credential-OAuth

 view release on metacpan or  search on metacpan

lib/Catalyst/Authentication/Credential/OAuth.pm  view on Meta::CPAN

    Catalyst::Exception->throw( "Provider is not defined." )
        unless defined $auth_info->{provider} || defined $self->providers->{ $auth_info->{provider} };

    my $provider = $self->providers->{ $auth_info->{provider} };

    for ( qw/ consumer_key consumer_secret request_token_endpoint access_token_endpoint user_auth_endpoint / ) {
        Catalyst::Exception->throw( $_ . " is not defined for provider ". $auth_info->{provider} )
            unless $provider->{$_};
    }

    my %defaults = (

lib/Catalyst/Authentication/Credential/OAuth.pm  view on Meta::CPAN


		my $request = Net::OAuth->request( 'access token' )->new(
			%defaults,
			token => $response->token,
			token_secret => '',
			request_url => $provider->{access_token_endpoint},
			verifier => $c->req->params->{oauth_verifier},
		);
		$request->sign;

		my $ua_response = $self->ua->request( GET $request->to_url );

lib/Catalyst/Authentication/Credential/OAuth.pm  view on Meta::CPAN

		return;
	}
	else {
		my $request = Net::OAuth->request( 'request token' )->new(
			%defaults,
			request_url => $provider->{request_token_endpoint}
		);
		$request->sign;

		my $ua_response = $self->ua->request( GET $request->to_url );

lib/Catalyst/Authentication/Credential/OAuth.pm  view on Meta::CPAN

		$request = Net::OAuth->request( 'user auth' )->new(
			%defaults,
			token => $response->token,
		);

		$c->res->redirect( $request->to_url( $provider->{user_auth_endpoint} ) );
	}

}


lib/Catalyst/Authentication/Credential/OAuth.pm  view on Meta::CPAN

                    class	OAuth
                    <providers>
                        <example.com>
                            consumer_key             my_app_key
                            consumer_secret          my_app_secret
                            request_token_endpoint   http://example.com/oauth/request_token
                            access_token_endpoint    http://example.com/oauth/access_token
                            user_auth_endpoint       http://example.com/oauth/authorize
                        </example.com>
                    </providers>
                </credential>
            </oauth>
        </realms>

 view all matches for this distribution


Catalyst-Authentication-Credential-OpenID

 view release on metacpan or  search on metacpan

t/Consumer/lib/TestApp/Controller/Root.pm  view on Meta::CPAN

              },
              setup_url => $c->uri_for($c->req->path, {moo => "setup"}),
              server_secret => $c->config->{startup_time},
              );

  # From your OpenID server endpoint:

    my ( $type, $data ) = $nos->handle_page;

    if ($type eq "redirect")
    {

 view all matches for this distribution


Catalyst-Controller-DBIC-API

 view release on metacpan or  search on metacpan

lib/Catalyst/Controller/DBIC/API.pm  view on Meta::CPAN

      item_root        => 'data',
      use_json_boolean => 1,
      return_object    => 1,
      );

  # Provides the following functional endpoints:
  # /api/rpc/artist/create
  # /api/rpc/artist/list
  # /api/rpc/artist/id/[id]/delete
  # /api/rpc/artist/id/[id]/update

=head1 DESCRIPTION

Easily provide common API endpoints based on your L<DBIx::Class> schema classes.
Module provides both RPC and REST interfaces to base functionality.
Uses L<Catalyst::Action::Serialize> and L<Catalyst::Action::Deserialize> to
serialize response and/or deserialise request.

=head1 OVERVIEW

This document describes base functionlity such as list, create, delete, update
and the setting of config attributes. L<Catalyst::Controller::DBIC::API::RPC>
and L<Catalyst::Controller::DBIC::API::REST> describe details of provided
endpoints to those base methods.

You will need to create a controller for each schema class you require API
endpoints for. For example if your schema has Artist and Track, and you want to
provide a RESTful interface to these, you should create
MyApp::Controller::API::REST::Artist and MyApp::Controller::API::REST::Track
which both subclass L<Catalyst::Controller::DBIC::API::REST>.
Similarly if you wanted to provide an RPC style interface then subclass
L<Catalyst::Controller::DBIC::API::RPC>. You then configure these individually

lib/Catalyst/Controller/DBIC/API.pm  view on Meta::CPAN


Generally it's better to have one controller for each DBIC source with the
config hardcoded, but in some cases this isn't possible.

Note that the Chained, CaptureArgs and PathPart are just standard Catalyst
configuration parameters and that then endpoint specified in Chained - in this
case '/api/rpc/rpc_base' - must actually exist elsewhere in your application.
See L<Catalyst::DispatchType::Chained> for more details.

Below are explanations for various configuration parameters. Please see
L<Catalyst::Controller::DBIC::API::StaticArguments> for more details.

 view all matches for this distribution


Catalyst-Controller-ElasticSearch

 view release on metacpan or  search on metacpan

lib/Catalyst/Controller/ElasticSearch.pm  view on Meta::CPAN

This controller base class provides some basic protection for your ElasticSearch
server. This will allow you to publish individual indices and types through
your Catalyst application. The controller will prevent malicious requests
such as huge size parameters or scripts.

ElasticSearch's C<_search> endpoint is very powerful. And with power comes great
responsibility. Instead of providing the vanilla search endpoint, it is recommeded
that you predefine searches that process only certain parameters. See L</DISABLING FEATURES>.

B<< Exposing ElasticSearch to the Internet is dangerous. MetaCPAN is doing it, 
and this module is the result of what we've learned so far. >>

lib/Catalyst/Controller/ElasticSearch.pm  view on Meta::CPAN

    } or do { $c->detach("error", [500, $@]) };
 }

=head1 ENDPOINTS

By default, this controller will create the following endpoints for a controller
named C<MyApp::Controller::Tweet>.

=head2 mapping

  /twitter/tweet/_mapping

lib/Catalyst/Controller/ElasticSearch.pm  view on Meta::CPAN


=head2 all

 /twitter/tweet

This endpoint is equivalent to C</tweet/_search?q=*>.

=head2 search

 /twitter/tweet/_search

This endpoint proxies to the search endpoint of ElasticSearch. However, it will
sanitize the query first.

=head1 ACCESS CONTROL

As with other controllers, you would do the access control in the C<auto>

 view all matches for this distribution


Catalyst-Controller-FlashRemoting

 view release on metacpan or  search on metacpan

lib/Catalyst/Controller/FlashRemoting.pm  view on Meta::CPAN


Flash Remoting is RPC subsystem and that use AMF (Action Message Format) as message body format.

=head1 USAGE

At first, you need api gateway (endpoint) controller. Add AMFGateway attribute to catalyst action for that.

    sub gateway :Local :AMFGateway { }

If you write above code in Root controller, then 'http://localhost:3000/gateway' is AMF Gateway url.

 view all matches for this distribution


Catalyst-Controller-SOAP

 view release on metacpan or  search on metacpan

lib/Catalyst/Action/SOAP/DocumentLiteralWrapped.pm  view on Meta::CPAN


 __PACKAGE__->{config}{soap_action_prefix} = 'http://foo/bar/';

 use base 'Catalyst::Controller::SOAP::DocumentLiteralWrapped';
 # or
 sub endpoint : Local ActionClass(SOAP::DocumentLiteralWrapped) { }

=head1 DESCRIPTION

Microsoft has defined a pseudo-standard for SOAP usage called
Document/Literal Wrapped. This standard is a deviation of both the

 view all matches for this distribution


Catalyst-ControllerPerContext

 view release on metacpan or  search on metacpan

lib/Catalyst/ControllerRole/URI.pm  view on Meta::CPAN


after 'register_action_methods', sub {
  my ( $self, $app, @methods ) = @_;
  my $class = ref $self;

  my @endpoints = ();
  my @types = @{ $app->dispatcher->dispatch_types ||+[] };
  foreach my $type (@types) {  
    if(ref($type) eq 'Catalyst::DispatchType::Chained') {
      foreach my $endpoint(@{ $type->{_endpoints} || [] }) {
        if ($endpoint->class eq $class) {
          push @endpoints, [$endpoint, $self->_generate_uri_pattern($type, $endpoint)];
        }
      }
    }
  }

lib/Catalyst/ControllerRole/URI.pm  view on Meta::CPAN

  my $col2_width = $avail_width - $col1_width;
  my $paths = Text::SimpleTable->new(
    [ $col1_width, 'uri' ], [ $col2_width, 'helper' ],
  );

  foreach my $endpoint_proto (@endpoints) {
    my $endpoint = $endpoint_proto->[0];
    my $uri = $endpoint_proto->[1];
    my $path_args = '';
    my $path_arg_count = 0;
    if(my @path_args = @{$endpoint_proto->[2]||[]}) {
      $path_arg_count = scalar(@path_args);
      $path_args = join ',', @path_args if scalar(@path_args) > 0;
      $path_args = "([$path_args])";
    }
    my $name = $endpoint->name;
    my $private_path = $endpoint->private_path; $private_path =~s/^\///; $private_path =~s/\//_/g;
    my $sub = sub {
      my $self = shift;
      my ($parts, @args) = $self->_normalize_uri_args(@_);  
      return $self->ctx->uri_for($self->action_for($name), $parts, @args);
    };

lib/Catalyst/ControllerRole/URI.pm  view on Meta::CPAN

    {
      no strict 'refs';
      my $controller_helper = "${class}::${name}_uri";
      *{$controller_helper} = Sub::Util::set_subname $controller_helper => $sub;
      my $app_helper = "${app}::${private_path}_uri";
      my $helper = $endpoint->private_path;
      *{$app_helper} = Sub::Util::set_subname $app_helper => sub {
        my $c = shift;
        return $c->uri_for($c->dispatcher->get_action_by_path($helper), @_);
      };
    }

lib/Catalyst/ControllerRole/URI.pm  view on Meta::CPAN


  $app->log->debug("URI Helpers for: $class\n" . $paths->draw . "\n");
};

sub _generate_uri_pattern {
  my ($self, $dispatcher, $endpoint) = @_;
  my $args = $endpoint->list_extra_info->{Args};

  my @parts;
  if($endpoint->has_args_constraints) {
      @parts = map { "{$_}" } $endpoint->all_args_constraints;
  } elsif(defined $endpoint->attributes->{Args}) {
      @parts = (defined($endpoint->attributes->{Args}[0]) ? (("*") x $args) : '...');
  }

  my @parents = ();
  my $parent = "DUMMY";
  my $extra  = $dispatcher->_list_extra_http_methods($endpoint);
  my $consumes = $dispatcher->_list_extra_consumes($endpoint);
  my $scheme = $dispatcher->_list_extra_scheme($endpoint);
  my $curr = $endpoint;
  while ($curr) {
      if (my $cap = $curr->list_extra_info->{CaptureArgs}) {
          if($curr->has_captures_constraints) {
              my $names = join '/', map { "{$_}" } $curr->all_captures_constraints;
              unshift(@parts, $names);

 view all matches for this distribution


( run in 0.441 second using v1.01-cache-2.11-cpan-27979f6cc8f )