Reputation: 3121
There are a lot of modules with Tie::
namespace on CPAN - Tie::Hash, Tie::Sub, Tie::Cache, Tie::DBI, etc. What is common among them ?
I checked perltie but 'm not sure that I understood the concept clear. Could someone explain it?
Upvotes: 4
Views: 121
Reputation: 69304
It only covers tying hashes, but my article on perl.com from 2001 might answer a few questions.
Upvotes: 3
Reputation: 386256
The modules in the Tie:: namespace fall into two categories:
tie
allows an object to take on the interface of a variable. When you read from a tied variable, you are actually calling a method to retrieve information. When you write to a tied variable, you are actually calling a method to with the information.
For example, let's look at a hash tied to Tie::DBI.
Upvotes: 9