Class::Phrasebook Class::Phrasebook 9 of 23 : [PREV] [NEXT]

The Module

What happens if our new Class::Phrasebook object fails to find the XML file?

  • a log message will be written to a log file.

How is the XML file found if we do not supply any path?

  • The class automatically searches the following directories:
    • The current directory.
    • The directory ./lib in the current directory.
    • The directory ../lib in the current directory.
    • @INC.

This allows us to create an XML file that comes with a module in an easy way: We should place the XML file in a lib directory below the directory of our module. Therefore, if the module we write is Blah, then its XML file will be placed in the directory Blah/lib.


© 2003 Barbie barbie@missbarbell.co.uk Home http://birmingham.pm.org/