Group
Extension

Matches 35358

App-Pebble ( J/JO/JOHANL/App-Pebble-0.008-TRIAL.tar.gz, JOHANL, 2011; MetaCPAN )
App-Pebble/lib/App/Pebble/Helpers/DateTime.pm ( view source; MetaCPAN )
DateTime helpers.

=head1 DESCRIPTION

Support DateTime objects "natively" by making sure they TO_JSON-ify
properly, and provide some useful helper methods.

=cut

package App::Pebble::Helpers::DateTi
ings;

use DateTime;
use Carp;

=head2 METHODS

=cut

# Needed by Pebble::Object and JSON::XS
sub DateTime::TO_JSON {
    my $self = shift;
    "$self";
}

=head2 DateTime::round( $to_unit = "day" ) :
Chart-OFC2 ( J/JK/JKUTEJ/Chart-OFC2-0.08_02.tar.gz, JKUTEJ, 2011; MetaCPAN )
Chart-OFC2/lib/Chart/OFC2/Title.pm ( view source; MetaCPAN )
THODS

=head2 new()

Object constructor.

=head2 TO_JSON()

Returns HashRef that is possible to give to C<encode_json()> function.

=cut

sub TO_JSON {
    my $self = shift;
    
    return {
        
Chart-OFC2 ( J/JK/JKUTEJ/Chart-OFC2-0.08_02.tar.gz, JKUTEJ, 2011; MetaCPAN )
Chart-OFC2/lib/Chart/OFC2.pm ( view source; MetaCPAN )
(
        'title'  => 'Bar chart test',
    );
    print $chart->render_swf(600, 400, 'chart-data.json', 'test-chart');

OFC2 bar chart data:

    use Chart::OFC2;
    use Chart::OFC2::Axis;
    use C
lash
Chart 2 is offering. But it should help you to starting creating OFC2
graphs quite fast. The JSON format is quite intuitive and can be created
from any hash. This module is more like guideline.

2 is a flash script for creating graphs. To have a graph we need an
F<open-flash-chart.swf> and a JSON data file describing graph data.
Complete examples you can find after successful run of this modu
WebService-Tumblr ( R/RO/ROKR/WebService-Tumblr-0.0010.tar.gz, ROKR, 2011; MetaCPAN )
WebService-Tumblr/lib/WebService/Tumblr.pm ( view source; MetaCPAN )
e LWP::UserAgent;
use HTTP::Request::Common();
use URI::PathAbstract;
use JSON;
our $json = JSON->new->pretty;
sub json { $json }

use WebService::Tumblr::Dispatch;
use WebService::Tumblr::Result;

us
App-Pebble ( J/JO/JOHANL/App-Pebble-0.008-TRIAL.tar.gz, JOHANL, 2011; MetaCPAN )
App-Pebble/lib/App/Pebble.pm ( view source; MetaCPAN )
arse matching lines into objects with named attributes.
  # The default output format is one-line JSON.
  cat lib/App/Pebble.pm | \
  p 'P->match( regex => qr/^=head(\d+)\s+(.+)/, has => ["level", "te
Chart-OFC2 ( J/JK/JKUTEJ/Chart-OFC2-0.08_02.tar.gz, JKUTEJ, 2011; MetaCPAN )
Chart-OFC2/lib/Chart/OFC2/HBar.pm ( view source; MetaCPAN )
ON

	extends 'Chart::OFC2::BarLineBase';

In L<Chart::OFC2::HBarValues> when converting values to JSON the values are
reversed. This is done so that the C<y_axis->labels> match to the values.
Also not
Chart-OFC2 ( J/JK/JKUTEJ/Chart-OFC2-0.08_02.tar.gz, JKUTEJ, 2011; MetaCPAN )
Chart-OFC2/lib/Chart/OFC2/Menu.pm ( view source; MetaCPAN )
THODS

=head2 new()

Object constructor.

=head2 TO_JSON()

Returns HashRef that is possible to give to C<encode_json()> function.

=cut

sub TO_JSON {
    my $self = shift;

    return {
        map 
Chart-OFC2 ( J/JK/JKUTEJ/Chart-OFC2-0.08_02.tar.gz, JKUTEJ, 2011; MetaCPAN )
Chart-OFC2/lib/Chart/OFC2/Bar.pm ( view source; MetaCPAN )
li><a href="http://cpansearch.perl.org/src/JKUTEJ/Chart-OFC2-0.08_01/examples/for-pod/bar-data.json">json source</a></li>
</ul>

=end html

=cut

use Moose;
use MooseX::StrictConstructor;

our $VERSIO
Chart-OFC2 ( J/JK/JKUTEJ/Chart-OFC2-0.08_02.tar.gz, JKUTEJ, 2011; MetaCPAN )
Chart-OFC2/lib/Chart/OFC2/Labels.pm ( view source; MetaCPAN )
THODS

=head2 new()

Object constructor.

=head2 TO_JSON()

Returns HashRef that is possible to give to C<encode_json()> function.

=cut

sub TO_JSON {
    my ($self) = @_;
    
    return {
        m
Chart-OFC2 ( J/JK/JKUTEJ/Chart-OFC2-0.08_02.tar.gz, JKUTEJ, 2011; MetaCPAN )
Chart-OFC2/lib/Chart/OFC2/Element.pm ( view source; MetaCPAN )
THODS

=head2 new()

Object constructor.

=head2 TO_JSON()

Returns HashRef that is possible to give to C<encode_json()> function.

=cut

sub TO_JSON {
    my $self = shift;
    
    my %hash = (
    
KiokuDB-Serializer-Crypt ( D/DO/DOY/KiokuDB-Serializer-Crypt-0.02.tar.gz, DOY, 2011; MetaCPAN )
KiokuDB-Serializer-Crypt/lib/KiokuDB/Serializer/Crypt.pm ( view source; MetaCPAN )
kend(
      $dsn,
      serializer => KiokuDB::Serializer::Crypt->new(
          serializer   => 'json',
          crypt_cipher => 'Rijndael',
          crypt_mode   => 'CFB',
          crypt_key    =
App-Pebble ( J/JO/JOHANL/App-Pebble-0.008-TRIAL.tar.gz, JOHANL, 2011; MetaCPAN )
App-Pebble/lib/App/Pebble/Helpers/DateTime/Duration.pm ( view source; MetaCPAN )
ration helpers.

=head1 DESCRIPTION

Support DateTime::Duration "natively" by making sure they TO_JSON-ify
properly, and provide some useful extra helper methods.

=cut

package App::Pebble::Helpers::


no warnings "redefine";

=head2 METHODS

=cut

# Needed by Pebble::Object and JSON::XS
sub DateTime::Duration::TO_JSON {
    my $self = shift;
    ###TODO: replace with format duration
    $self->in
Chart-OFC2 ( J/JK/JKUTEJ/Chart-OFC2-0.08_02.tar.gz, JKUTEJ, 2011; MetaCPAN )
Chart-OFC2/lib/Chart/OFC2/Extremes.pm ( view source; MetaCPAN )
is_max($max)
        if defined $max;
}


=head2 TO_JSON()

Returns HashRef that is possible to give to C<encode_json()> function.

=cut

sub TO_JSON {
    my $self = shift;
    
    return {
        
Chart-OFC2 ( J/JK/JKUTEJ/Chart-OFC2-0.08_02.tar.gz, JKUTEJ, 2011; MetaCPAN )
Chart-OFC2/lib/Chart/OFC2/ToolTip.pm ( view source; MetaCPAN )
THODS

=head2 new()

Object constructor.

=head2 TO_JSON()

Returns HashRef that is possible to give to C<encode_json()> function.

=cut

sub TO_JSON {
    my $self = shift;
    
    return {
        
Chart-OFC2 ( J/JK/JKUTEJ/Chart-OFC2-0.08_02.tar.gz, JKUTEJ, 2011; MetaCPAN )
Chart-OFC2/lib/Chart/OFC2/Pie.pm ( view source; MetaCPAN )
li><a href="http://cpansearch.perl.org/src/JKUTEJ/Chart-OFC2-0.08_02/examples/for-pod/pie-data.json">json source</a></li>
</ul>

=end html

=cut

use Moose;
use MooseX::StrictConstructor;

our $VERSIO
s 'values'        => (is => 'rw', isa => 'Chart::OFC2::PieValues', 'coerce' => 1,);

override 'TO_JSON' => sub {
    my $self = shift;
    
    my $pie_element = super();
    
    # get the colours fr
Net-Chaton-API ( P/PO/POCKET/Net-Chaton-API-0.02.tar.gz, POCKET, 2011; MetaCPAN )
Net-Chaton-API/lib/Net/Chaton/API.pm ( view source; MetaCPAN )
nings;
use Pipe::Between::Object;
use LWP::UserAgent;
use HTTP::Request::Common qw(GET POST);
use JSON;
use utf8;
use Desktop::Notify;
use Encode::Guess qw/shiftjis euc-jp 7bit-jis/;
use Encode qw/fro
);

our $VERSION = '0.02';


# Preloaded methods go here.

our $ua = LWP::UserAgent->new;
our $json = JSON->new->allow_nonref;

sub new {#{{{
	my $class = shift;
	my $self = {
		who => 'Net::Chaton::A
 = POST($apilogin_url, [%postdata]);
	my $responce = $ua->request($req);
	my $decoded_responce = $json->decode($responce->content);
	$self->{'post-uri'} = $decoded_responce->{'post-uri'};
	$self->{'co
Data-Babel-Client ( P/PH/PHONYBONE/Data-Babel-Client-0.02.tar.gz, PHONYBONE, 2011; MetaCPAN )
Data-Babel-Client/lib/Data/Babel/Client.pm ( view source; MetaCPAN )
VERSION = '0.02';

use Carp;
use Data::Dumper;
use LWP::UserAgent;
use HTTP::Request::Common;
use JSON;

use vars qw(@AUTO_ATTRIBUTES @CLASS_ATTRIBUTES %DEFAULTS @EXPORT_OK);

use Class::AutoClass qw(
=@_;
    my %args=(request_type=>'idtypes',
	output_format=>'json');
	      
    my $content=$self->_fetch(%args);
    my $table=decode_json($content);
    
    wantarray? @$table:$table;
}


# reques
 translate {
    my ($self,%argHash)=@_;
    my %args=(request_type=>'translate', output_format=>'json');
    delete @argHash{keys %args}; # override values
    @args{keys %argHash}=values %argHash if
CatalystX-Controller-ExtJS-REST-SimpleExcel ( P/PE/PERLER/CatalystX-Controller-ExtJS-REST-SimpleExcel-0.1.1.tar.gz, PERLER, 2011; MetaCPAN )
CatalystX-Controller-ExtJS-REST-SimpleExcel/lib/CatalystX/Controller/ExtJS/REST/SimpleExcel.pm ( view source; MetaCPAN )
traits => 'CatalystX::Controller::ExtJS::REST::SimpleExcel::Trait';
use strict;
use warnings;
use JSON::XS ();

after list => sub {
    my ($self, $c) = @_;
    return unless($c->request->accepts('app
       $rcopy = $rcopy->{$1};
            }
            push(@row, ref $rcopy->{$hcopy} ? JSON::XS::encode_json($rcopy->{$hcopy}) : $rcopy->{$hcopy} );
        }
        push(@rows, \@row);
    }
    
CatalystX-Controller-ExtJS-REST-SimpleExcel ( P/PE/PERLER/CatalystX-Controller-ExtJS-REST-SimpleExcel-0.1.1.tar.gz, PERLER, 2011; MetaCPAN )
CatalystX-Controller-ExtJS-REST-SimpleExcel/README.pod ( view source; MetaCPAN )
traits => 'CatalystX::Controller::ExtJS::REST::SimpleExcel::Trait';
use strict;
use warnings;
use JSON::XS ();

after list => sub {
    my ($self, $c) = @_;
    return unless($c->request->accepts('app
       $rcopy = $rcopy->{$1};
            }
            push(@row, ref $rcopy->{$hcopy} ? JSON::XS::encode_json($rcopy->{$hcopy}) : $rcopy->{$hcopy} );
        }
        push(@rows, \@row);
    }
    
Chart-OFC2 ( J/JK/JKUTEJ/Chart-OFC2-0.08_02.tar.gz, JKUTEJ, 2011; MetaCPAN )
Chart-OFC2/lib/Chart/OFC2/Axis.pm ( view source; MetaCPAN )
too

=head1 METHODS

=head2 TO_JSON()

Returns HashRef that is possible to give to C<encode_json()> function.

=cut

sub TO_JSON {
    my ($self) = @_;
    
    my %json = (
        map  { my $v = $se
{ $_->name } $self->meta->get_all_attributes
    );
    $json{'3d'} = delete $json{'is3d'}
        if (exists $json{'is3d'});

    return \%json;
}

=head2 color()

Same as colour().

=cut

sub color 

Powered by Groonga
Maintained by Kenichi Ishigaki <ishigaki@cpan.org>. If you find anything, submit it on GitHub.