Chapter 11. Link Checking

This chapter introduces some very important Perl features that we’ll be using in the rest of the book. For one thing, it shows how to use references to create a multilevel data structure. It also shows how to download and install CPAN modules. Finally, it offers a brief introduction to object-oriented Perl to help you take advantage of the many object-oriented modules available from CPAN. Even if you don’t think you need a link-checking program, you should still take a look at the concepts introduced in this chapter.

Maintaining Links

One of the key factors in the success of the Web was Tim Berners-Lee’s original decision to make links one-way. That is, anyone can construct a link connecting any web page to any other web page, and do so quickly and easily. There is no need to register with some central repository of links, no requirement that a return link be established and maintained, no need even to inform the people at the other end that you are linking to them. You just put an <A HREF=...> tag in your web page, and boom, you have a link. I still get a kick out of teaching people new to HTML how to do that. There is always that moment of shocked silence, usually followed by the question, “It’s that easy?”

This was one of Berners-Lee’s main goals when he invented the Web. He wanted people to be able to do with computers what they do so easily with their brains: make connections between seemingly unrelated things. The downside to this freedom, though, ...

Get Perl for Web Site Management now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.