# Method call walk-through

- ## Consider a simple prepare call: $dbh->prepare(…)

- ## $dbh is reference to an object in the DBI::db class (regardless of driver)

- ## The DBI::db::prepare method is an alias for the DBI dispatch method

- ## DBI dispatch calls the driver’s own prepare method something like this:

  my $inner_hash_ref = tied %$dbh;
  my $implementor_class = $inner_hash_ref->{ImplementorClass};
  $inner_hash_ref->$implementor_class::prepare(...)

- ## Driver code gets the inner hash

  - so it has fast access to the hash contents without tie overheads

- ##

## _

Previous slide | Next slide | Back to first slide | View graphic version