I have written a sotware and today I have moved this software on a more power machine...
but there are some problems and I do not understand if they are related to Perl. In a point I've written this:
my ($hashed_passwd) = 'a_complicated_salted_password'; my $agent = master->resultset('Agent')->search({ user => params->{login}, pass => $hashed_passwd, })->single; if ($agent) { return Dumper($agent->get_columns); } else { return 'hard error'; }
and the output is:
$VAR1 = 'pass'; $VAR2 = 'a_complicated_salted_password'; $VAR3 = 'creation'; $VAR4 = '0000-00-00 00:00:00'; $VAR5 = 'note'; $VAR6 = undef; $VAR7 = 'id'; $VAR8 = '28'; $VAR9 = 'id_appalto'; $VAR10 = undef; $VAR11 = 'user'; $VAR12 = 'superadmin'; $VAR13 = 'profilo'; $VAR14 = 'Superadmin'; $VAR15 = 'last_login'; $VAR16 = '2015-06-24 11:31:39'; $VAR17 = 'ts'; $VAR18 = '2015-06-25 18:17:03'; $VAR19 = 'disabled'; $VAR20 = '0';
It look likes there is no problem.
But if I write this:
my ($hashed_passwd) = 'a_complicated_salted_password'; my $agent = master->resultset('Agent')->search({ user => params->{login}, pass => $hashed_passwd, })->single; if ($agent) { return Dumper($agent->profilo); } else { return 'hard error'; }
I get this error:
Can't call method "columns" on an undefined value at /usr/local/share/ +perl/5.18.2/DBIx/Class/ResultSet.pm line 3527, <DATA> line 16.
On old machine, this code return the profile, so 'Superadmin'.
Have you any idea?
Thank you

($_="nzz ojjdloobnf jjt tqqbebd77jojxfc")=~y~wb-zg2-5c96-8~aa-z0-9~s=~s~~~s;$_=~y~5-8~fuck~;print

In reply to DBIx::Class problem (probably) by spadacciniweb

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.