Skip to content

Instantly share code, notes, and snippets.

@wchristian
Created December 21, 2010 16:32
Show Gist options
  • Save wchristian/750168 to your computer and use it in GitHub Desktop.
Save wchristian/750168 to your computer and use it in GitHub Desktop.
sub makeData {
print "makeData\n";
for my $hotel ( values %{$gl_hotel} ) {
for my $destination ( @{ $hotel->{airports} } ) {
for my $dest_flights_on_date ( values %{$gl_flug->{ $destination }} ) {
for my $target_dest_flights ( values %{ $dest_flights_on_date } ) {
for my $dest_flight ( @{$target_dest_flights} ) {
my $target_return_flights = $gl_rueckflug->{ $destination }{ $dest_flight->{ahc} } || {};
for my $return_flights ( values %{$target_return_flights} ) {
process_trip( $_ ) for build_trips( $dest_flight, $return_flights, $hotel );
}
}
}
}
}
}
return;
}
sub makeData {
print "makeData\n";
for my $hotel ( values %{$gl_hotel} ) {
for my $dest_flight ( get_flights( 'H', $hotel->{airports} ) ) {
my $return_flights = get_flights( 'R', [ $dest_flight->{ahc} ], [ $dest_flight->{zhc} ] );
process_trip( $_ ) for build_trips( $dest_flight, $return_flights, $hotel );
}
}
return;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment