App-ProxyHunter-Model-Schema-Pg

 view release on metacpan or  search on metacpan

META.json  view on Meta::CPAN

      },
      "configure" : {
         "requires" : {
            "ExtUtils::MakeMaker" : "6.52"
         }
      },
      "runtime" : {
         "requires" : {
            "App::ProxyHunter" : "0.01",
            "DBD::Pg" : "0.4",
            "DateTime::Format::Pg" : "0"
         }
      }
   },
   "release_status" : "stable",
   "resources" : {
      "repository" : {
         "url" : "https://github.com/olegwtf/p5-App-ProxyHunter-Model-Schema-Pg"
      }
   },
   "version" : "0.01"

META.yml  view on Meta::CPAN

  url: http://module-build.sourceforge.net/META-spec-v1.4.html
  version: 1.4
name: App-ProxyHunter-Model-Schema-Pg
no_index:
  directory:
    - t
    - inc
requires:
  App::ProxyHunter: 0.01
  DBD::Pg: 0.4
  DateTime::Format::Pg: 0
resources:
  repository: https://github.com/olegwtf/p5-App-ProxyHunter-Model-Schema-Pg
version: 0.01

Makefile.PL  view on Meta::CPAN

use strict;
use ExtUtils::MakeMaker;

WriteMakefile(
	NAME              => 'App::ProxyHunter::Model::Schema::Pg',
	LICENSE           => 'perl',
	VERSION_FROM      => 'lib/App/ProxyHunter/Model/Schema/Pg.pm',
	PREREQ_PM         => {
		App::ProxyHunter::     => 0.01,
		DBD::Pg::              => 0.4,
		DateTime::Format::Pg:: => 0
	},
	BUILD_REQUIRES     => { 'Test::More' => 0.88 },
	CONFIGURE_REQUIRES => {
		'ExtUtils::MakeMaker' => 6.52,
	},
	META_MERGE        => {
		resources => {repository => 'https://github.com/olegwtf/p5-App-ProxyHunter-Model-Schema-Pg'},
	},
	($] >= 5.005 ?
	(ABSTRACT_FROM  => 'lib/App/ProxyHunter/Model/Schema/Pg.pm',

README  view on Meta::CPAN

   make
   make test
   make install

DEPENDENCIES

This module requires these other modules and libraries:

  App::ProxyHunter
  DBD::Pg
  DateTime::Format::Pg

COPYRIGHT AND LICENCE

Copyright (C) 2014 by Oleg G

This library is free software; you can redistribute it and/or modify
it under the same terms as Perl itself

lib/App/ProxyHunter/Model/Schema/Pg.pm  view on Meta::CPAN

package App::ProxyHunter::Model::Schema::Pg;

use Mo;
use Teng::Schema::Declare;
use DateTime::Format::Pg;
use App::ProxyHunter::Constants;
use App::ProxyHunter::Model::SchemaUtils qw'proxy_name_to_type proxy_type_to_name';
extends 'App::ProxyHunter::Model::Schema';

our $VERSION = '0.01';

sub perl_datetime_to_sql {
	return unless defined $_[0];
	DateTime::Format::Pg->format_datetime($_[0]);
}

sub sql_datetime_to_perl {
	return unless defined $_[0];
	DateTime::Format::Pg->parse_datetime($_[0])->set_time_zone(TZ);
}

sub perl_bool_to_sql {
	if (ref $_[0]) {
		return ${$_[0]} ? 't' : 'f';
	}
	
	$_[0] ? 't' : 'f';
}



( run in 0.294 second using v1.01-cache-2.11-cpan-05444aca049 )