[Bast-commits] r5412 -
trunk/DBIx-Class-EncodedColumn/t/lib/DigestTest/Schema
groditi at dev.catalyst.perl.org
groditi at dev.catalyst.perl.org
Thu Feb 5 02:39:59 GMT 2009
Author: groditi
Date: 2009-02-05 02:39:59 +0000 (Thu, 05 Feb 2009)
New Revision: 5412
Modified:
trunk/DBIx-Class-EncodedColumn/t/lib/DigestTest/Schema/Test.pm
Log:
reformat
Modified: trunk/DBIx-Class-EncodedColumn/t/lib/DigestTest/Schema/Test.pm
===================================================================
--- trunk/DBIx-Class-EncodedColumn/t/lib/DigestTest/Schema/Test.pm 2009-02-05 02:35:41 UTC (rev 5411)
+++ trunk/DBIx-Class-EncodedColumn/t/lib/DigestTest/Schema/Test.pm 2009-02-05 02:39:59 UTC (rev 5412)
@@ -12,141 +12,138 @@
__PACKAGE__->load_components(qw/EncodedColumn Core/);
__PACKAGE__->table('test');
-__PACKAGE__->add_columns
- (
- id => {
- data_type => 'int',
- is_nullable => 0,
- is_auto_increment => 1
- },
- dummy_col => {
- data_type => 'char',
- size => 43,
- encode_column => 0,
- encode_class => 'Digest',
- encode_check_method => 'check_dummy_col',
- },
- );
+__PACKAGE__->add_columns(
+ id => {
+ data_type => 'int',
+ is_nullable => 0,
+ is_auto_increment => 1
+ },
+ dummy_col => {
+ data_type => 'char',
+ size => 43,
+ encode_column => 0,
+ encode_class => 'Digest',
+ encode_check_method => 'check_dummy_col',
+ },
+);
if( $sha_ok ) {
- __PACKAGE__->add_columns
- (
- sha1_hex => {
- data_type => 'char',
- is_nullable => 1,
- size => 40,
- encode_column => 1,
- encode_class => 'Digest',
- encode_args => {
- format => 'hex',
- algorithm => 'SHA-1',
- },
- encode_check_method => 'check_sha1_hex',
- },
- sha1_b64 => {
- data_type => 'char',
- is_nullable => 1,
- size => 27,
- encode_column => 1,
- encode_class => 'Digest',
- encode_args => {
- algorithm => 'SHA-1',
- },
- encode_check_method => 'check_sha1_b64',
- },
- sha256_hex => {
- data_type => 'char',
- is_nullable => 1,
- size => 64,
- encode_column => 1,
- encode_class => 'Digest',
- encode_args => { format => 'hex',},
- },
- sha256_b64 => {
- data_type => 'char',
- is_nullable => 1,
- size => 43,
- accessor => 'sha256b64',
- encode_column => 1,
- encode_class => 'Digest',
- },
- sha256_b64_salted => {
- data_type => 'char',
- is_nullable => 1,
- size => 57,
- encode_column => 1,
- encode_class => 'Digest',
- encode_check_method => 'check_sha256_b64_salted',
- encode_args => {salt_length => 14}
- },
- );
+ __PACKAGE__->add_columns(
+ sha1_hex => {
+ data_type => 'char',
+ is_nullable => 1,
+ size => 40,
+ encode_column => 1,
+ encode_class => 'Digest',
+ encode_args => {
+ format => 'hex',
+ algorithm => 'SHA-1',
+ },
+ encode_check_method => 'check_sha1_hex',
+ },
+ sha1_b64 => {
+ data_type => 'char',
+ is_nullable => 1,
+ size => 27,
+ encode_column => 1,
+ encode_class => 'Digest',
+ encode_args => {
+ algorithm => 'SHA-1',
+ },
+ encode_check_method => 'check_sha1_b64',
+ },
+ sha256_hex => {
+ data_type => 'char',
+ is_nullable => 1,
+ size => 64,
+ encode_column => 1,
+ encode_class => 'Digest',
+ encode_args => { format => 'hex',},
+ },
+ sha256_b64 => {
+ data_type => 'char',
+ is_nullable => 1,
+ size => 43,
+ accessor => 'sha256b64',
+ encode_column => 1,
+ encode_class => 'Digest',
+ },
+ sha256_b64_salted => {
+ data_type => 'char',
+ is_nullable => 1,
+ size => 57,
+ encode_column => 1,
+ encode_class => 'Digest',
+ encode_check_method => 'check_sha256_b64_salted',
+ encode_args => {salt_length => 14}
+ },
+ );
}
if( $bcrypt_ok ){
- __PACKAGE__->add_columns
- (
- bcrypt_1 => {
- data_type => 'text',
- is_nullable => 1,
- size => 60,
- encode_column => 1,
- encode_class => 'Crypt::Eksblowfish::Bcrypt',
- encode_check_method => 'bcrypt_1_check',
- },
- bcrypt_2 => {
- data_type => 'text',
- is_nullable => 1,
- size => 59,
- encode_column => 1,
- encode_class => 'Crypt::Eksblowfish::Bcrypt',
- encode_args => {key_nul => 0, cost => 6 },
- encode_check_method => 'bcrypt_2_check',
- },
- );
+ __PACKAGE__->add_columns(
+ bcrypt_1 => {
+ data_type => 'text',
+ is_nullable => 1,
+ size => 60,
+ encode_column => 1,
+ encode_class => 'Crypt::Eksblowfish::Bcrypt',
+ encode_check_method => 'bcrypt_1_check',
+ },
+ bcrypt_2 => {
+ data_type => 'text',
+ is_nullable => 1,
+ size => 59,
+ encode_column => 1,
+ encode_class => 'Crypt::Eksblowfish::Bcrypt',
+ encode_args => {key_nul => 0, cost => 6 },
+ encode_check_method => 'bcrypt_2_check',
+ },
+ );
}
if( $pgp_ok ){
- my $pgp_conf = {
- SecRing => "$FindBin::Bin/secring.gpg",
- PubRing => "$FindBin::Bin/pubring.gpg",
- };
- __PACKAGE__->add_columns(
- pgp_col_passphrase => {
- data_type => 'text',
- is_nullable => 1,
- encode_column => 1,
- encode_class => 'Crypt::OpenPGP',
- encode_args => {
- passphrase => 'Secret Words',
- armour => 1
- },
- encode_check_method => 'decrypt_pgp_passphrase',
- },
- pgp_col_key => {
- data_type => 'text',
- is_nullable => 1,
- encode_column => 1,
- encode_class => 'Crypt::OpenPGP',
- encode_args => {
- recipient => '1B8924AA',
- pgp_args => $pgp_conf,
- armour => 1
- },
- encode_check_method => 'decrypt_pgp_key',
- },
- pgp_col_key_ps => {
- data_type => 'text',
- is_nullable => 1,
- encode_column => 1,
- encode_class => 'Crypt::OpenPGP',
- encode_args => {
- recipient => '7BEF6294',
- pgp_args => $pgp_conf,
- armour => 1
- },
- encode_check_method => 'decrypt_pgp_key_ps',
- },
- );
+ my $pgp_conf = {
+ SecRing => "$FindBin::Bin/secring.gpg",
+ PubRing => "$FindBin::Bin/pubring.gpg",
+ };
+ __PACKAGE__->add_columns(
+ pgp_col_passphrase => {
+ data_type => 'text',
+ is_nullable => 1,
+ encode_column => 1,
+ encode_class => 'Crypt::OpenPGP',
+ encode_args => {
+ passphrase => 'Secret Words',
+ armour => 1
+ },
+ encode_check_method => 'decrypt_pgp_passphrase',
+ },
+ pgp_col_key => {
+ data_type => 'text',
+ is_nullable => 1,
+ encode_column => 1,
+ encode_class => 'Crypt::OpenPGP',
+ encode_args => {
+ recipient => '1B8924AA',
+ pgp_args => $pgp_conf,
+ armour => 1
+ },
+ encode_check_method => 'decrypt_pgp_key',
+ },
+ pgp_col_key_ps => {
+ data_type => 'text',
+ is_nullable => 1,
+ encode_column => 1,
+ encode_class => 'Crypt::OpenPGP',
+ encode_args => {
+ recipient => '7BEF6294',
+ pgp_args => $pgp_conf,
+ armour => 1
+ },
+ encode_check_method => 'decrypt_pgp_key_ps',
+ },
+ );
}
__PACKAGE__->set_primary_key('id');
More information about the Bast-commits
mailing list