Chapter 8. Using and authoring modules

 

This chapter covers

  • The role of the module system
  • Module basics
  • Working with modules
  • Writing script modules
  • Binary modules

The value of a telecommunications network is proportional to the square of the number of connected users of the system.

Robert Metcalfe (Metcalfe’s Law)

A popular meme in the software industry is that the best programmers are lazy—rather than writing new code to solve a problem, they try to reuse existing code. This leverages the work that others have done to debug and document that code. Unfortunately, this kind of reuse happens less often than it should.

Note

From user studies, the PowerShell team has verified that prior to the introduction of PowerShell, the most common reuse pattern in the IT professional community is copy and paste. A user gets a script from somewhere, copies it, and then modifies it, repeating this process for each new application. Although this works to a degree and has a low barrier to entry, it doesn’t scale well. This approach is slowly changing to thinking about code reuse, but adoption is slow.

8.1. The role of a module system

8.2. Module basics

8.3. Working with modules

8.4. Writing script modules

8.5. Binary modules

8.6. Summary

sitemap