Git Product home page Git Product logo

dbix-class-encodedcolumn's Introduction

Hi there ๐Ÿ‘‹

I am a software engineer with Bachelor's degree in Computer Science. I've already worked on applications in different data domains, and with main experience in web development, QA and operations.

I am a contributor of open source software projects.

More about me at http://wallace.reis.me/

dbix-class-encodedcolumn's People

Contributors

ferki avatar jawnsy avatar lharey avatar perlpilot avatar perlpunk avatar robrwo avatar syspete avatar wreis avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

dbix-class-encodedcolumn's Issues

Can't locate DBIx/Class/TimeStamp.pm

t/author/timestamp_order.t fails if DBIx::Class::TimeStamp is not installed:

...
{UNKNOWN}: Can't locate DBIx/Class/TimeStamp.pm in @INC (you may need to install the DBIx::Class::TimeStamp module) (@INC contains: ...
 .) at /home/cpansand/.cpan/build/2019091705/Class-C3-Componentised-1.001002-0/blib/lib/Class/C3/Componentised.pm line 146.
 at /usr/local/lib/perl5/5.30/base.pm line 137.
Compilation failed in require at /usr/local/lib/perl5/5.30/base.pm line 137.
	...propagated at /usr/local/lib/perl5/5.30/base.pm line 159.
BEGIN failed--compilation aborted at /home/cpansand/.cpan/build/2019091705/DBIx-Class-EncodedColumn-0.00018-0/t/author/../lib/DigestTest/Schema/WithTimeStampChild.pm line 6.
Compilation failed in require at /home/cpansand/.cpan/build/2019091705/Class-C3-Componentised-1.001002-0/blib/lib/Class/C3/Componentised.pm line 146. at /home/cpansand/.cpan/build/2019091705/Class-C3-Componentised-1.001002-0/blib/lib/Class/C3/Componentised.pm line 151
t/author/timestamp_order.t .. 
Dubious, test returned 2 (wstat 512, 0x200)
No subtests run 
...

components loading order can affect the result

hi.
I usually using result_base_class for prevent loading components multiple times.

package App::Schema::Parent;
use Moose;
use MooseX::NonMoose;
use namespace::autoclean;

extends 'DBIx::Class::Core';

__PACKAGE__->load_components(qw/
    InflateColumn::DateTime
    TimeStamp
    EncodedColumn
/);

__PACKAGE__->meta->make_immutable;

1;

above, EncodedColumn is display after TimeStamp.

if derived class extends this class, EncodedColumn is not working.
here is my test file. https://dl.dropboxusercontent.com/u/16719710/tmp/oops.tar.gz
execute for just type perl test.pl

if switching EncodedColumn and TimeStamp position,
it works.

I don't know this issue associate with this modules.
maybe this is more associate with DBIx::Class core.

thanks.

Allow encoding arguments to be a hashref to allow upgrading

Algorithms that are considered safe to use now may not be considered safe in the future. Or one often has legacy code using an algorithm that is no longer considered safe to use.

It would be nice if this could be configured to handle multiple encoding types, to allow upgrading or changing an algorithm.

The hashed password would have an optional prefix, e.g. "blowfish:fa846084d81c4cf52a5421ad351d63efe495". The encoding configuration could be a hash where the keys are the names of the coding types (with a default assumed when hashing a new password).

The configuration could be something like

__PACKAGE__->add_columns(
  'password' => {
    data_type => 'CHAR',
    size      => 22,
    encode => {
      "md5" => {
         encode_column => 1,
         encode_class  => 'Digest',
         encode_args   => {algorithm => 'MD5', format => 'base64'},
         encode_check_method => 'check_password',
         no_key => 1, # assume this if there is no prefix
      },
     "blowfish" => {
         encode_column => 1,
         encode_class  => 'Crypt::Eksblowfish::Bcrypt',
         encode_args   => { key_nul => 0, cost => 8 },
         encode_check_method => 'check_password',
         default => 1, # use this as the default algorithm
    }
}

Requires Math::Pari

On my Strawberry Perl 5.12.3, Crypt::Random is installed but Math::Pari is not, and /t/open_pgp.t fails until Math::Pari is installed.

Crypt::OpenPGP uses Crypt::Random; Crypt::Random does not require Math::Pari, except when you ask Crypt::Random to do things it needs Math::Pari to do.

encoding does not work in next scenario

	my $data =  {
		first_name         => '',
		middle_name        => '',
		last_name          => '',
		language_id        => 1,
		timezone           => 'Europe/Kiev',
		datetime_format_id => 1,
		person_passwords   => [ {
			password => $v->param( 'password' )    # values are unencoded
		} ],
		person_emails      => [ {
			email    => $v->param( 'email'    )
		} ],
	};

	my $user =  $c->model( 'Person' )->create( $data );

provide examples

EncodedColumn performs the operation when the value is set, or on new

For set you have example, but there is no for new.

Build fails

.cpan/build/DBIx-Class-EncodedColumn-0 513 > perl Makefile.PL 
Can't call method "load_all_extensions" on an undefined value at inc/Module/Install.pm line 206.
BEGIN failed--compilation aborted at Makefile.PL line 5.
 my @exts = @{$self->{extensions}};
 unless ( @exts ) {
  @exts = $self->{admin}->load_all_extensions; # <---- HERE
 }

The comment on IRC was it's a busted release, including a bunch of stuff it shouldn't
I tested it because it (indirectly) depends on Text::CSV_XS. I'll from now on exclude it from my test list until it is fixed.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.