Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

jfluhmann (6902)

  reversethis-{moc.liamg} {ta} {nnamhulf}
AOL IM: campfluhmann (Add Buddy, Send Message)
Yahoo! ID: jfluhmann (Add User, Send Message)
Public Calendar: Subscribe, Download

I work for Angelo State University as somewhat of a Windows server administrator. I am the founding member of the San Angelo Perl Mongers. I'm fairly new to the Perl Community at large.

I can be found on irc in #yapc, #news, and #win32. I'm trying to help out with the project. I've recently acquired a PAUSE ID and might have a module or two on the CPAN (by the time you read this). []

I am also one of the organizers for YAPC::NA 2007. []

Journal of jfluhmann (6902)

Monday August 07, 2006
03:22 PM

Possibly writing a CPAN module

[ #30558 ]

As I've started trying to become more involved in the Perl community (starting a local PM group, contributing to, offering a yapc bid, volunteering), I have been considering putting a module on CPAN. I have some reading up to do in order to prepare a module to be worthy of CPAN, but I'm up for it.

At my previous job, I maintained an IIS server for 400+ web accounts and users. The "old" way of creating new accounts was to manually:

  • create a 'New User' for the new account with a 'Real Name' description and a random password
  • create a folder for the new account
  • set the permissions on the folder
  • create the new website in IIS
  • create a new ftp account in IIS
  • e-mail the maintainer of the new site their information (instructions, username, password, etc)

I quickly grew tired of the "old" way, so I automated it. I setup a page that allowed me to type in the desired username and 'Real Name' for the new account, as well as the new account's contact e-mail. The page would then send it off to the server to do everything for me and mail the information to the new account's contact.

I had to do a lot of researching to figure out how to create a 'new website' on IIS in Perl (not just a virtual site). There wasn't much out there (or I wasn't using the right search terms).

I've been in a different job for almost a year now, but out of curiosity, I did a quick search on CPAN for anything relating to IIS and found only ONE IIS admin module. I'll probably do some work this week and see what happens.

If anyone has any advice, comments, or recommendations to offer, please do so. I appreciate any feedback.

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.
  • On the technical side of writing a module, Sam Tregar's book "Writing Perl Modules for CPAN" is pretty good on the topic. It's slightly dated (Module::Build has come a long way), but really gives a great step-by-step view of the process. It makes it seem really easy.

    On the design side of things, I really encourage you to playtest your API. Write sample code that would use your module. (Test are good for that, hint, hint.)

    Also, the XP practice of YAGNI (You Ain't Gonna Need It) is a good one to think

    • Thanks, David! I'm going through some of the testing now. When I initially wrote parts of it (for work), it was pretty specific to my situation, no tests, and documentation was a crap shoot. I've recently (about a month ago) picked up Ian and chromatic's 'Perl Testing: A Developer's Notebook'. I've started incorporating testing into my new code and hope that it becomes second nature in the near future.

      Also, since this will be my first CPAN submission, it will definitely follow the practice of YAGNI. I