in reply to pops, shifts and eqs

Well, $pass is an object, and it must not stringify in the $password eq $pass clause. Is there a method like $pass->text or $pass->value you can compare against instead?

On a side note (and you may very well have done this just for debugging), don't use "yes", "no", and "n/a" for boolean values .. you lose the ability to say if($ok) and you also introduce string comparison and the potential for error/typos/maintenance that that brings..
my $ok; # it's undef if( ... ){ # going to actually set it $ok = $password eq $pass ? 1 : 0 } ... if($ok){ # do good stuff } ... if(!$ok){ # if failed for any reason } ... if(defined $ok && !$ok){ # if set to false } ... if(! defined $ok){ # if unset } ... printf "Status: %s\n", (defined $ok ? ($ok?'yes':'no') : 'n/a');

Replies are listed 'Best First'.
Re^2: pops, shifts and eqs
by barrycarlyon (Beadle) on Apr 17, 2006 at 21:09 UTC

    no -> there a method like $pass->text or $pass->value

    I dont know how

    Barry Carlyon barry@barrycarlyon.co.uk

      package LSRfm::DBI; use strict; use warnings; use base qw(Class::DBI); use Apache::Reload; use LSRfm::Config; my $config = $LSRfm::Config::DATABASE; LSRfm::DBI->connection("dbi:mysql:host=$config->{host};database=$confi +g->{name}", $config->{dbuser}, $config->{dbpasswd}); 1;

      Barry Carlyon barry@barrycarlyon.co.uk
        $pass->password should do it then .. See your LSRfm::Database::Show_Passwords source, your LSRfm::DBI source, and the Class::DBI docs more more info.