Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: Rules based Perl

by boo_radley (Parson)
on Nov 05, 2003 at 18:52 UTC ( #304823=note: print w/replies, xml ) Need Help??


in reply to Rules based Perl

if a b c > X but less than Y or possibly U or b c d > Z the kicker is that each of the variables may have dozens or hundreds of values (parsed from multiple files) so the normal if/else is not feasible.
Have you seen Quantum::Superpositions? I bet any() and all() can help you collapse those tricky sets of decisions and values.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://304823]
help
Chatterbox?
[SuicideJunkie]: Just wait; someday soon, you'll be given a DB with unicode emojis in the column names.
[Corion]: marinersk: Well, I have done select statements like select sum(foo) as "Total Amount", ..., but to have a table like that makes me shudder
[Corion]: SuicideJunkie: :-D
[marinersk]: SuicideJunkie LOL
[choroba]: Woohoo! Fixed a test that hasn't run for 3 years.
[marinersk]: Corion Yes, sometimes whitespace in column headers is acceptable, but I still consider it be less than desireable if that query might get revectored for an ETL-esque process...
[marinersk]: choroba++
[choroba]: it's a long running test, so it's normally skipped unless an env var is set
[choroba]: nobody has been bothered to set the variable in the last 3 years
[marinersk]: sub newtest{my $expected_result = &target('foo'); my $actual_result = &target('foo'); if ($actual_result eq $expected_result) { &tdd_success(); } else { &tdd_fail(); } } # Test works after three years!

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (10)
As of 2017-05-25 15:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?