<?xml version="1.0" encoding="utf-8" ?>

<rss version="2.0" 
   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
   xmlns:admin="http://webns.net/mvcb/"
   xmlns:dc="http://purl.org/dc/elements/1.1/"
   xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
   xmlns:wfw="http://wellformedweb.org/CommentAPI/"
   xmlns:content="http://purl.org/rss/1.0/modules/content/"
   >
<channel>
    <title>phly, boy, phly - Perl</title>
    <link>http://weierophinney.net/matthew/</link>
    <description>Ramblings on PHP, Linux, and other Geeky Topics</description>
    <dc:language>en</dc:language>
    <generator>Serendipity 1.0.4 - http://www.s9y.org/</generator>
    <pubDate>Fri, 22 Sep 2006 13:21:27 GMT</pubDate>

    <image>
        <url>http://weierophinney.net/matthew/templates/matthew/img/s9y_banner_small.png</url>
        <title>RSS: phly, boy, phly - Perl - Ramblings on PHP, Linux, and other Geeky Topics</title>
        <link>http://weierophinney.net/matthew/</link>
        <width>100</width>
        <height>21</height>
    </image>

<item>
    <title>Vim 7 code completion</title>
    <link>http://weierophinney.net/matthew/archives/123-Vim-7-code-completion.html</link>
            <category>Perl</category>
            <category>PHP</category>
            <category>Programming</category>
    
    <comments>http://weierophinney.net/matthew/archives/123-Vim-7-code-completion.html#comments</comments>
    <wfw:comment>http://weierophinney.net/matthew/wfwcomment.php?cid=123</wfw:comment>

    <slash:comments>3</slash:comments>
    <wfw:commentRss>http://weierophinney.net/matthew/rss.php?version=2.0&amp;type=comments&amp;cid=123</wfw:commentRss>
    

    <author>nospam@example.com (Matthew Weier O'Phinney)</author>
    <content:encoded>
    &lt;p&gt;
    I may work at &lt;a href=&quot;http://www.zend.com/&quot;&gt;Zend&lt;/a&gt;, but I&#039;ve never been a
    fan of IDEs. They simply don&#039;t suit my programming style. I can usually keep
    track of file locations in my head pretty easily, and what I really need is
    a blank slate on which I can write, and one that doesn&#039;t consume resource
    that can better be used running web servers and other programs. Syntax
    highlighting, good indentation -- these are important, but you can get these
    from good, minimal text editors very easily. 
    &lt;a href=&quot;http://www.vim.org&quot;&gt;Vim is my editor of choice&lt;/a&gt;.
&lt;/p&gt;
&lt;p&gt;
    I will admit, though, that one area where I have had IDE-envy is the area of
    code completion. I often find myself doing quick lookups to php.net or
    perldoc to determine the order of arguments to a function or method call,
    or checking for the expected return value. Most of the time, this doesn&#039;t
    take much time, however, so I just live with it.
&lt;/p&gt;
&lt;p&gt;
    Today, however, cruising through the blogosphere, I came across 
    &lt;a href=&quot;http://linuxhelp.blogspot.com/2006/09/visual-walk-through-of-couple-of-new.html&quot;&gt;an article showcasing some new features of Vim 7.0&lt;/a&gt;, 
    and discovered Vim 7&#039;s code completion.
&lt;/p&gt;
&lt;p&gt;
    Basically, while in insert mode, you can type &amp;lt;C-x&amp;gt; &amp;lt;C-o&amp;gt; to
    have vim attempt to autocomplete the current keyword. If more than one
    possibility exists, it shows a dropdown, and you can use your arrow keys to
    highlight the keyword that you wish to use.
&lt;/p&gt;
&lt;p&gt;
    But it gets better! Not only does it do this kind of autocompletion, but it
    also opens a small &#039;scratch preview&#039; pane showing the function/method
    signature -- i.e., the expected arguments and return value!
&lt;/p&gt;
&lt;p&gt;
    I thought I had little need for IDEs before... now I have even less! Bram
    and the rest of the Vim team, my hat&#039;s off to you for more fine work!
&lt;/p&gt;
 
    </content:encoded>

    <pubDate>Tue, 19 Sep 2006 17:45:00 -0400</pubDate>
    <guid isPermaLink="false">http://weierophinney.net/matthew/archives/123-guid.html</guid>
    
</item>
<item>
    <title>Telcos are Attacking the Internet</title>
    <link>http://weierophinney.net/matthew/archives/107-Telcos-are-Attacking-the-Internet.html</link>
            <category>Perl</category>
            <category>PHP</category>
            <category>Programming</category>
    
    <comments>http://weierophinney.net/matthew/archives/107-Telcos-are-Attacking-the-Internet.html#comments</comments>
    <wfw:comment>http://weierophinney.net/matthew/wfwcomment.php?cid=107</wfw:comment>

    <slash:comments>7</slash:comments>
    <wfw:commentRss>http://weierophinney.net/matthew/rss.php?version=2.0&amp;type=comments&amp;cid=107</wfw:commentRss>
    

    <author>nospam@example.com (Matthew Weier O'Phinney)</author>
    <content:encoded>
    &lt;p&gt;
    I generally try to stay out of politics on this blog, but this time
    something has to be said, as it affects anyone who uses the internet, at
    least in the US.
&lt;/p&gt;
&lt;p&gt;
    Basically, a number of telcos and cable providers are talking about charging
    internet content providers -- the places you browse to on the internet,
    places like Google, Yahoo!, Amazon, etc. -- fees to ensure bandwidth to
    their sites. Their argument is that these content providers are getting a
    &#039;free ride&#039; on their lines, and generating a lot of traffic themselves, and
    should thus be paying for the cost of bandwidth.
&lt;/p&gt;
&lt;p&gt;
    This is patently ridiculous. Content providers already have to pay for their
    bandwidth -- they, too, have ISPs or agreements with telcos in place, either
    explicitly or via their hosting providers. Sure, some of them, particularly
    search engines, send out robots in order to index or find content, but,
    again, they&#039;re paying for the bandwidth those robots generate.
    Additionally, people using the internet are typically paying for bandwidth
    as well, through their relationship with their ISP. What this amounts to is
    the telcos getting paid not just by each person to whom they provide
    internet access, but every end point on the internet, at least those within
    the US.
&lt;/p&gt;
&lt;p&gt;
    What this is really about is telcos wanting more money, and wanting to push
    their own content. As an example, let&#039;s say your ISP is AOL. AOL is part of
    Time Warner, and thus has ties to those media sources. Now, those media
    sources may put pressure on AOL to reduce bandwidth to sites operated by
    ABC, CBS, NBC, FOX, Disney, PBS, etc. This might mean that your kid can no
    longer visit the Sesame Street website reliably, because AOL has reduced the
    amount of bandwidth allowed to that service -- but any media site in the TWC
    would get optimal access, so they could get to Cartoon Network. Not to slam
    Cartoon Network (I love it), but would you rather have your kid visiting
    cartoonnetwork.com or pbskids.org?  Basically, content providers would not
    need to compete based on the value of their content, but on who they can get
    to subscribe to their service.
&lt;/p&gt;
&lt;p&gt;
    Here&#039;s another idea: your ISP is MSN. You want to use Google... but MSN has
    limited the bandwidth to Google because it&#039;s a competitor, and won&#039;t accept
    any amount of money to increase that bandwidth. They do the same with Yahoo!
    So, now you&#039;re limited to MSN search, because that&#039;s the only one that
    responds reliably -- regardless of whether or not you like their search
    results. By doing so, they&#039;ve just artificially inflated the value of their
    search engine -- without needing to compete based on merit. 
&lt;/p&gt;
&lt;p&gt;
    Additionally, let&#039;s say Barnes and Noble has paid MSN to ensure good
    bandwidth, but part of that agreement is a non-compete clause.  Now you find
    your connections to Amazon timing out, meaning that you can&#039;t even see which
    book provider has the better price on the book you want; you&#039;re stuck
    looking and buying from B&amp;amp;N.
&lt;/p&gt;
&lt;p&gt;
    Now, let&#039;s look at something a little more close to home for those of us
    developing web applications. There have been a number of success stories the
    last few years: MySpace, Digg, and Flickr all come to mind. Would these
    endeavors have been as successful had they needed to pay multiple times for
    bandwidth, once to their ISP and once each to each telco charging for
    content providers? Indeed, some of these are still free services -- how
    would they ever have been able to pay the extra amounts to the telcos in the
    first place?
&lt;/p&gt;
&lt;p&gt;
    So, basically, the only winners here are the telcos.
&lt;/p&gt;
&lt;p&gt;
    Considering how ludicrous this scheme is, one must be thinking, isn&#039;t the US
    Government going to step in and regulate against such behaviour? &lt;a href=&quot;http://www.businessweek.com/technology/content/apr2006/tc20060426_553893.htm?chan=technology_technology+index+page_more+of+today&quot;&gt;The answer, sadly, is no.&lt;/a&gt;
    The GOP doesn&#039;t like regulation, and so they want market forces to decide.
    Sadly, what this will likely do is force a number of content providers to
    offshore their internet operations -- which is likely to have some pretty
    negative effects on the economy.
&lt;/p&gt;
&lt;p&gt;
    The decision isn&#039;t final -- efforts can still be made to prevent it (the
    above link references a Senate committee meeting; there&#039;s been no vote on
    it). Call your representatives today and give them an earful. Tell them it&#039;s
    not just about regulation of the industry, but about fair competition in the
    market. Allowing the telcos to extort money from content providers will only
    reduce the US&#039; economic chances in the world, and stifle innovation and
    choice.
&lt;/p&gt;
 
    </content:encoded>

    <pubDate>Fri, 28 Apr 2006 11:31:00 -0400</pubDate>
    <guid isPermaLink="false">http://weierophinney.net/matthew/archives/107-guid.html</guid>
    
</item>
<item>
    <title>PHP error reporting for Perl users</title>
    <link>http://weierophinney.net/matthew/archives/105-PHP-error-reporting-for-Perl-users.html</link>
            <category>Perl</category>
            <category>PHP</category>
    
    <comments>http://weierophinney.net/matthew/archives/105-PHP-error-reporting-for-Perl-users.html#comments</comments>
    <wfw:comment>http://weierophinney.net/matthew/wfwcomment.php?cid=105</wfw:comment>

    <slash:comments>7</slash:comments>
    <wfw:commentRss>http://weierophinney.net/matthew/rss.php?version=2.0&amp;type=comments&amp;cid=105</wfw:commentRss>
    

    <author>nospam@example.com (Matthew Weier O'Phinney)</author>
    <content:encoded>
    &lt;p&gt;
    On &lt;a href=&quot;http://www.perlmonks.org&quot;&gt;perlmonks&lt;/a&gt; today, a user was
    needing to maintain a PHP app, and wanted to know what the PHP equivalent of
    &quot;perl -wc script.pl&quot; was -- specifically, they wanted to know how to run a
    PHP script from the commandline and have it display any warnings (ala perl&#039;s
    strict and warnings pragmas).
&lt;/p&gt;
&lt;p&gt;
    Unfortunately, there&#039;s not as simple a way to do this in PHP as in perl.
    Basically, you need to do the following:
&lt;/p&gt;
&lt;ul&gt;
    &lt;li&gt;&lt;strong&gt;To display errors:&lt;/strong&gt;&lt;ul&gt;
        &lt;li&gt;In you php.ini file, set &quot;display_errors = On&quot;, &lt;b&gt;or&lt;/b&gt;&lt;/li&gt;
        &lt;li&gt;In your script, add the line &quot;ini_set(&#039;display_errors&#039;, true);&quot;&lt;/li&gt;
    &lt;/ul&gt;&lt;/li&gt;
    &lt;li&gt;&lt;strong&gt;To show notices, warnings, errors, deprecation
        notices:&lt;/strong&gt;&lt;ul&gt;
        &lt;li&gt;In you php.ini file, set &quot;error_reporting = E_ALL | E_STRICT&quot;, &lt;b&gt;or&lt;/b&gt;&lt;/li&gt;
        &lt;li&gt;In your script, add the line &quot;error_reporting(E_ALL | E_STRICT);&quot;&lt;/li&gt;
    &lt;/ul&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
    Alternatively, you can create a file with the lines:
&lt;/p&gt;
&lt;pre&gt;
&amp;lt;?php
    error_reporting(E_ALL | E_STRICT);
    ini_set(&#039;display_errors&#039;, true);
&lt;/pre&gt;
&lt;p&gt;
    and then set the php.ini setting &#039;auto_prepend_file&#039; to the path to that
    file.
&lt;/p&gt;
&lt;p&gt;
    &lt;strong&gt;NOTE: do not do any of the above on a production system!&lt;/strong&gt;
    PHP&#039;s error messages often reveal a lot about your applications, including
    file layout and potential vectors of attack. Turn display_errors off on
    production machines, set your error_reporting somewhat lower, and log_errors
    to a file so you can keep track of what&#039;s going on on your production
    system.
&lt;/p&gt;
&lt;p&gt;
    The second part of the question was how to run a PHP script on the command
    line. This is incredibly simple: php myscript.php. No different than any
    other scripting language.
&lt;/p&gt;
&lt;p&gt;
    You can get some good information by using some of the switches, though.
    &lt;strong&gt;&#039;-l&#039;&lt;/strong&gt; turns the PHP interpreter into a linter, and can let
    you know if your code is well-formed (which doesn&#039;t necessarily preclude
    runtime or parse errors). &lt;strong&gt;&#039;-f&#039;&lt;/strong&gt; will run the script through
    the parser, which can give you even more information. I typically bind these
    actions to keys in vim so I can check my work as I go.
&lt;/p&gt;
&lt;p&gt;
    If you plan on running your code &lt;em&gt;solely&lt;/em&gt; on the commandline, add a
    shebang to the first line of your script: #!/path/to/php. Then make the
    script executable, and you&#039;re good to go. This is handy for cronjobs, or
    batch processing scripts.
&lt;/p&gt;
&lt;p&gt;
    All of this information is readily available in &lt;a
        href=&quot;http://www.php.net/manual&quot;&gt;the PHP manual&lt;/a&gt;, and the commandline
    options are always available by passing the --help switch to the PHP
    executable. So, start testing your scripts already!
&lt;/p&gt;
 
    </content:encoded>

    <pubDate>Mon, 27 Mar 2006 23:10:00 -0500</pubDate>
    <guid isPermaLink="false">http://weierophinney.net/matthew/archives/105-guid.html</guid>
    
</item>
<item>
    <title>Sign of a Geek</title>
    <link>http://weierophinney.net/matthew/archives/51-Sign-of-a-Geek.html</link>
            <category>Perl</category>
            <category>Personal</category>
            <category>Programming</category>
    
    <comments>http://weierophinney.net/matthew/archives/51-Sign-of-a-Geek.html#comments</comments>
    <wfw:comment>http://weierophinney.net/matthew/wfwcomment.php?cid=51</wfw:comment>

    <slash:comments>1</slash:comments>
    <wfw:commentRss>http://weierophinney.net/matthew/rss.php?version=2.0&amp;type=comments&amp;cid=51</wfw:commentRss>
    

    <author>nospam@example.com (Matthew Weier O'Phinney)</author>
    <content:encoded>
    &lt;p&gt;
    It&#039;s now been confirmed: I&#039;m a geek. 
&lt;/p&gt;
&lt;p&gt;
    Okay, so that probably comes as no shocker to those of you who know me, but
    it&#039;s the little things that make me realize it myself.
&lt;/p&gt;
&lt;p&gt;
    I&#039;ve been frequenting &lt;a href=&quot;http://www.perlmonks.org&quot;&gt;Perl Monks&lt;/a&gt; for
    a couple of years now, mainly to garner ideas and code to help me with my
    personal or work projects. I rarely post comments, and I&#039;ve only once
    submitted a question to the site. However, I &lt;strong&gt;do&lt;/strong&gt; frequent
    the site regularly, and the few comments I&#039;ve put in -- generally regarding
    usage of &lt;a href=&quot;http::/search.cpan.org/search?query=CGI%3A%3AApplication&quot;&gt;CGI::Application&lt;/a&gt;
    -- have been typically well-moderated.
&lt;/p&gt;
&lt;p&gt;
    Well, yesterday I &lt;a href=&quot;http://www.perlmonks.org/?node_id=408255&quot;&gt;made a comment&lt;/a&gt; to a user &lt;a href=&quot;http://www.perlmonks.org/?node_id=408231&quot;&gt;asking about editors to
        use with perl&lt;/a&gt;. I was incensed by a remark he made about &lt;a href=&quot;http://www.vim.org&quot;&gt;VIM&lt;/a&gt; not having the features he needed.
    Now, as I said in my comment, I&#039;ve used VIM on a daily basis for over two
    years, and I&#039;m &lt;em&gt;still&lt;/em&gt; discovering new features -- and I&#039;ve used all
    of the features he was looking for.
&lt;/p&gt;
&lt;p&gt;
    This is where I discovered I&#039;m a geek: my comment made it into the &lt;a href=&quot;http://www.perlmonks.org/?node=Best%20Nodes&quot;&gt;Daily
    Best&lt;/a&gt; for today, peaking around number 5. The fact that that made my day
    indicates to me that I &lt;em&gt;must&lt;/em&gt; be a geek.
&lt;/p&gt;
&lt;p&gt;
    Oh -- and VIM rules!
&lt;/p&gt; 
    </content:encoded>

    <pubDate>Wed, 17 Nov 2004 16:04:39 -0500</pubDate>
    <guid isPermaLink="false">http://weierophinney.net/matthew/archives/51-guid.html</guid>
    
</item>
<item>
    <title>PHP_SELF versus SCRIPT_NAME</title>
    <link>http://weierophinney.net/matthew/archives/45-PHP_SELF-versus-SCRIPT_NAME.html</link>
            <category>Perl</category>
            <category>Personal</category>
            <category>PHP</category>
    
    <comments>http://weierophinney.net/matthew/archives/45-PHP_SELF-versus-SCRIPT_NAME.html#comments</comments>
    <wfw:comment>http://weierophinney.net/matthew/wfwcomment.php?cid=45</wfw:comment>

    <slash:comments>2</slash:comments>
    <wfw:commentRss>http://weierophinney.net/matthew/rss.php?version=2.0&amp;type=comments&amp;cid=45</wfw:commentRss>
    

    <author>nospam@example.com (Matthew Weier O'Phinney)</author>
    <content:encoded>
    &lt;p&gt;
    I&#039;ve standardized my PHP programming to use the environment variable
    &lt;b&gt;SCRIPT_NAME&lt;/b&gt; when I want my script to refer to itself in links and
    form actions. I&#039;ve known that &lt;b&gt;PHP_SELF&lt;/b&gt; has the same information, but
    I was more familiar with the name &#039;SCRIPT_NAME&#039; from using it in perl, and
    liked the feel of it more as it seems to describe the resource better
    (&#039;PHP_SELF&#039; could stand for the path to the PHP executable if I were to go
    by the name only).
&lt;/p&gt;
&lt;p&gt;
    However, I just noticed a post on the php.general newsgroup where somebody
    asked what the difference was between them. Semantically, there isn&#039;t any;
    they should contain the same information. However, historically and
    technically speaking, there is. &lt;b&gt;SCRIPT_NAME&lt;/b&gt; is defined in the CGI 1.1
    specification, and is thus a standard. &lt;em&gt;However&lt;/em&gt;, not all web servers
    actually implement it, and thus it isn&#039;t necessarily &lt;em&gt;portable&lt;/em&gt;.
    &lt;b&gt;PHP_SELF&lt;/b&gt;, on the other hand, is implemented directly by PHP, and as
    long as you&#039;re programming in PHP, will always be present.
&lt;/p&gt;
&lt;p&gt;
    Guess I have some grep and sed in my future as I change a bunch of
    scripts...
&lt;/p&gt; 
    </content:encoded>

    <pubDate>Tue, 12 Oct 2004 21:34:57 -0400</pubDate>
    <guid isPermaLink="false">http://weierophinney.net/matthew/archives/45-guid.html</guid>
    
</item>
<item>
    <title>Cgiapp Roadmap</title>
    <link>http://weierophinney.net/matthew/archives/41-Cgiapp-Roadmap.html</link>
            <category>Perl</category>
            <category>Personal</category>
            <category>PHP</category>
            <category>Programming</category>
    
    <comments>http://weierophinney.net/matthew/archives/41-Cgiapp-Roadmap.html#comments</comments>
    <wfw:comment>http://weierophinney.net/matthew/wfwcomment.php?cid=41</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://weierophinney.net/matthew/rss.php?version=2.0&amp;type=comments&amp;cid=41</wfw:commentRss>
    

    <author>nospam@example.com (Matthew Weier O'Phinney)</author>
    <content:encoded>
    &lt;p&gt;
    I&#039;ve had a few people contact me indicating interest in Cgiapp, and I&#039;ve
    noticed a number of subscribers to the freshmeat project I&#039;ve setup. In
    addition, we&#039;re using the library extensively at the &lt;a href=&quot;http://www.garden.org&quot;&gt;National Gardening Association&lt;/a&gt; in
    developing our new site (the current site is using a mixture of ASP and
    Tango, with several newer applications using PHP). I&#039;ve also been monitoring
    the CGI::Application mailing list. As a result of all this activity, I&#039;ve
    decided I need to develop a roadmap for Cgiapp.
&lt;/p&gt;
&lt;p&gt;Currently, planned changes include:&lt;/p&gt;
&lt;ul&gt;
    &lt;li&gt;&lt;b&gt;Version 1.x series:&lt;/b&gt;
        &lt;ul&gt;
            &lt;li&gt;Adding a Smarty registration for stripslashes (the Smarty
            &quot;function&quot; call will be sslashes).&lt;/li&gt;
            &lt;li&gt;param() bugfix: currently, calling param() with no arguments
            simply gives you a list of parameters registered with the method,
            but not their values; this will be fixed.&lt;/li&gt;
            &lt;li&gt;error_mode() method. The CGI::Application ML brought up and
            implemented the idea of an error_mode() method to register
            an error_mode with the object (similar to run_modes()). While
            non-essential, it would offer a standard, built-in hook for error
            handling.&lt;/li&gt;
            &lt;li&gt;$PATH_INFO traversing. Again, on the CGI::App ML, a request was
            brought up for built-in support for using $PATH_INFO to determine
            the run mode. Basically, you would pass a parameter indicating which
            location in the $PATH_INFO string holds the run mode.&lt;/li&gt;
            &lt;li&gt;DocBook tutorials. I feel that too much information is given in
            the class-level documentation, and that usage tutorials need to be
            written. Since I&#039;m documenting with PhpDoc and targetting PEAR,
            moving tutorials into DocBook is a logical step.&lt;/li&gt;
        &lt;/ul&gt;
    &lt;/li&gt;
    &lt;li&gt;&lt;b&gt;Version 2.x series:&lt;/b&gt;&lt;br /&gt;
        Yes, a Cgiapp2 is in the future. There are a few changes that are either
        necessitating (a) PHP5, or (b) API changes. In keeping with PEAR
        guidelines, I&#039;ll rename the module Cgiapp2 so as not to break
        applications designed for Cgiapp.&lt;br /&gt;&lt;br /&gt;
        Changes expected include:
        &lt;ul&gt;
            &lt;li&gt;Inherit from PEAR. This will allow for some built in error
            handling, among other things. I suspect that this will tie in with
            the error_mode(), and may also deprecate croak() and carp().&lt;/li&gt;
            &lt;li&gt;Changes to tmpl_path() and load_tmpl(). In the perl version, you
            would instantiate a template using load_tmpl(), assign your
            variables to it, and then do your fetch() on it. So, this:
                &lt;pre&gt;
$this-&gt;tmpl_assign(&#039;var1&#039;, &#039;val1&#039;);
$body = $this-&gt;load_tmpl(&#039;template.html&#039;);
                &lt;/pre&gt;
            Becomes this:
                &lt;pre&gt;
$tmpl = $this-&gt;load_tmpl();
$tmpl-&gt;assign(&#039;var1&#039;, &#039;val1&#039;);
$body = $tmpl-&gt;fetch(&#039;template.html&#039;);
                &lt;/pre&gt;
            OR
                &lt;pre&gt;
$tmpl = $this-&gt;load_tmpl(&#039;template.html&#039;);
$tmpl-&gt;assign(&#039;var1&#039;, &#039;val1&#039;);
$body = $tmpl-&gt;fetch();
                &lt;/pre&gt;
            (Both examples assume use of Smarty.) I want to revert to
            this behaviour for several reasons:
                &lt;ul&gt;
                    &lt;li&gt;Portability with perl. This is one area in which the PHP
                    and perl versions differ greatly; going to the perl way
                    makes porting classes between the two languages
                    simpler.&lt;/li&gt;
                    &lt;li&gt;Decoupling. The current set of template methods create
                    an object as a parameter of the application object - which
                    is fine, unless the template object instantiator returns an
                    object of a different kind.&lt;/li&gt;
                &lt;/ul&gt;
            Cons:
                &lt;ul&gt;
                     &lt;li&gt;Smarty can use the same object to fill multiple
                     templates, and the current methods make use of this. By
                     assigning the template object locally to each method, this
                     could be lost.&lt;br /&gt;&lt;br /&gt;
                     HOWEVER... an easy work-around would be for load_tmpl() to
                     create the object and store it an a parameter; subsequent
                     calls would return the same object reference. The
                     difficulty then would be if load_tmpl() assumed a template
                     name would be passed.  However, even in CGI::App, you
                     decide on a template engine and design for that engine;
                     there is never an assumption that template engines should
                     be swappable.&lt;/li&gt;
                     &lt;li&gt;Existing Cgiapp1 applications would need to be
                     rewritten.&lt;/li&gt;
                &lt;/ul&gt;
            &lt;/li&gt;
            &lt;li&gt;&lt;b&gt;Plugin Architecture:&lt;/b&gt;
                The CGI::App ML has produced a ::Plugin namespace that utilizes
                a common plugin architecture. The way it is done in perl is
                through some magic of namespaces and export routines... both of
                which are, notably, missing from PHP.&lt;br /&gt;&lt;br /&gt;
                However, I think I may know a workaround for this, if I use
                PHP5: the magic __call() overloader method.&lt;br /&gt;&lt;br /&gt;
                My idea is to have plugin classes register methods that should
                be accessible by a Cgiapp-based class a special key in the
                $_GLOBALS array.  Then, the __call() method would check the
                key for registered methods; if one is found matching a method
                requested, that method is called (using call_user_func()), with
                the Cgiapp-based object reference as the first reference. Voila!
                instant plugins!&lt;br /&gt;&lt;br /&gt;
                Why do this? A library of &#039;standard&#039; plugins could then be
                created, such as:
                &lt;ul&gt;
                    &lt;li&gt;A form validation plugin&lt;/li&gt;
                    &lt;li&gt;Alternate template engines as plugins (instead of
                    overriding the tmpl_* methods)&lt;/li&gt;
                    &lt;li&gt;An authorization plugin&lt;/li&gt;
                &lt;/ul&gt;
                Since the &#039;exported&#039; methods would have access to the Cgiapp
                object, they could even register objects or parameters with it.
            &lt;/li&gt;
        &lt;/ul&gt;
    &lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
    If you have any requests or comments on the roadmap, please feel free to &lt;a href=&quot;http://weierophinney.net/matthew/contact&quot;&gt;contact me&lt;/a&gt;.
&lt;/p&gt; 
    </content:encoded>

    <pubDate>Tue, 21 Sep 2004 10:40:45 -0400</pubDate>
    <guid isPermaLink="false">http://weierophinney.net/matthew/archives/41-guid.html</guid>
    
</item>
<item>
    <title>Cgiapp: A PHP Class</title>
    <link>http://weierophinney.net/matthew/archives/32-Cgiapp-A-PHP-Class.html</link>
            <category>Perl</category>
            <category>Personal</category>
            <category>PHP</category>
            <category>Programming</category>
    
    <comments>http://weierophinney.net/matthew/archives/32-Cgiapp-A-PHP-Class.html#comments</comments>
    <wfw:comment>http://weierophinney.net/matthew/wfwcomment.php?cid=32</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://weierophinney.net/matthew/rss.php?version=2.0&amp;type=comments&amp;cid=32</wfw:commentRss>
    

    <author>nospam@example.com (Matthew Weier O'Phinney)</author>
    <content:encoded>
    &lt;p&gt;
    After working on some OO classes yesterday for an application backend I&#039;m
    developing for work, I decided I needed to create a &lt;tt&gt;BREAD&lt;/tt&gt; class to
    make this simpler. You know,
    &lt;b&gt;B&lt;/b&gt;rowse-&lt;b&gt;R&lt;/b&gt;ead-&lt;b&gt;E&lt;/b&gt;dit-&lt;b&gt;A&lt;/b&gt;dd-&lt;b&gt;D&lt;/b&gt;elete.
&lt;/p&gt;
&lt;p&gt;
    At first, I figured I&#039;d build off of what I&#039;d done yesterday. But then I got
    to thinking (ah, thinking, my curse). I ran into the &lt;tt&gt;BREAD&lt;/tt&gt; concept
    originally when investigating &lt;tt&gt;CGI::Application&lt;/tt&gt;; a number of
    individuals had developed &lt;tt&gt;CGI::Apps&lt;/tt&gt; that provided this
    functionality. I&#039;d discarded them usually because they provided more
    functionality than I needed or because they introduced more complexity than
    I was willing to tackle right then.
&lt;/p&gt;
&lt;p&gt;
    But once my thoughts had gone to &lt;tt&gt;BREAD&lt;/tt&gt; and &lt;tt&gt;CGI::App&lt;/tt&gt;, I
    started thinking how nice it would be to have &lt;tt&gt;CGI::Application&lt;/tt&gt; for
    PHP. And then I thought, why not? What prevents me from porting it? I have
    the source...
&lt;/p&gt;
&lt;p&gt;
    So, today I stayed home with Maeve, who, on the tail end of an illness,
    evidently ran herself down when at daycare yesterday, and stayed home
    sleeping most of the day. So, while she was resting, I sat down with a
    printout of the non-POD code of &lt;tt&gt;CGI::App&lt;/tt&gt; and hammered out what I
    needed to do. Then, when she fell asleep for a nap, I typed it all out and
    started testing. And, I&#039;m proud to say, it works. For an example, visit &lt;a href=&quot;http://dev.weierophinney.net/cgiapp/test.php&quot;&gt;my development
        site&lt;/a&gt; to see a very simple, templated application in action.
&lt;/p&gt; 
    </content:encoded>

    <pubDate>Tue, 30 Mar 2004 21:57:31 -0500</pubDate>
    <guid isPermaLink="false">http://weierophinney.net/matthew/archives/32-guid.html</guid>
    
</item>
<item>
    <title>POD for PHP</title>
    <link>http://weierophinney.net/matthew/archives/34-POD-for-PHP.html</link>
            <category>Perl</category>
            <category>Personal</category>
            <category>PHP</category>
    
    <comments>http://weierophinney.net/matthew/archives/34-POD-for-PHP.html#comments</comments>
    <wfw:comment>http://weierophinney.net/matthew/wfwcomment.php?cid=34</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://weierophinney.net/matthew/rss.php?version=2.0&amp;type=comments&amp;cid=34</wfw:commentRss>
    

    <author>nospam@example.com (Matthew Weier O'Phinney)</author>
    <content:encoded>
    &lt;p&gt;
    I was lamenting at work the other day that now that I&#039;ve discovered OO and
    templating with PHP, the only major feature missing for me is a way to
    easily document my programs. I&#039;m a big fan of perl&#039;s POD, and use it fairly
    extensively, even for simple scripts -- it&#039;s a way to provide a quick manual
    without needing to worry too much about how to format it.
&lt;/p&gt;
&lt;p&gt;
    So, it hit me on the way home Friday night: what prevents me from using POD
    in multiline comments of PHP scripts? I thought I&#039;d give it a try when I got
    home.
&lt;/p&gt;
&lt;p&gt;
    First I googled for &#039;POD for PHP&#039;, and found a link to perlmongers where
    somebody recounted seeing that exact thing done, and how nicely it worked.
&lt;/p&gt;
&lt;p&gt;
    Then I tried it.. and it indeed worked. So, basically, I&#039;ve got all the
    tools I love from perl in PHP, one of which is borrowed directly from the
    language!
&lt;/p&gt; 
    </content:encoded>

    <pubDate>Sun, 28 Mar 2004 19:33:39 -0500</pubDate>
    <guid isPermaLink="false">http://weierophinney.net/matthew/archives/34-guid.html</guid>
    
</item>
<item>
    <title>Scrap that. We're gonna' use PHP</title>
    <link>http://weierophinney.net/matthew/archives/35-Scrap-that.-Were-gonna-use-PHP.html</link>
            <category>Perl</category>
            <category>Personal</category>
            <category>PHP</category>
            <category>Programming</category>
    
    <comments>http://weierophinney.net/matthew/archives/35-Scrap-that.-Were-gonna-use-PHP.html#comments</comments>
    <wfw:comment>http://weierophinney.net/matthew/wfwcomment.php?cid=35</wfw:comment>

    <slash:comments>1</slash:comments>
    <wfw:commentRss>http://weierophinney.net/matthew/rss.php?version=2.0&amp;type=comments&amp;cid=35</wfw:commentRss>
    

    <author>nospam@example.com (Matthew Weier O'Phinney)</author>
    <content:encoded>
    &lt;p&gt;
    I&#039;ve been researching and coding for a couple months now with the decision
    that I&#039;d rewrite the family website/portal using mod_perl with
    CGI::Application. I still like the idea, but a couple things recently have
    made me rethink it.
&lt;/p&gt;
&lt;p&gt;
    For starters, the perl DBI is a bit of a pain to program. At work, I&#039;ve
    become very accustomed to using PEAR&#039;s DB library, and while it&#039;s in many
    ways derived from perl&#039;s DBI, it&#039;s much simpler to use. 
&lt;/p&gt;
&lt;p&gt;
    Then there&#039;s the whole HTML::Template debacle. There&#039;s several ways in which
    to write the templates, but they don&#039;t all work in all situations, and, it
    seems they&#039;re a bit limited. We&#039;ve started using PHP&#039;s Smarty at work, and
    it&#039;s much more intuitive, a wee bit more consistent, and almost infinitely
    more extendable. I could go the Template::Toolkit route for perl, but that&#039;s
    almost like learning another whole language.
&lt;/p&gt;
&lt;p&gt;
    Then, there&#039;s the way objects work in perl versus PHP. I&#039;ve discovered
    that PHP objects are very easy and very extendable. I wouldn&#039;t have found
    them half as easy, however, if I hadn&#039;t already been doing object oriented
    programming in perl. One major difference, however, is how easy it is to
    create new attributes on the fly, and the syntax is much easier and cleaner.
&lt;/p&gt;
&lt;p&gt;
    Add to that the fact that if you want to dynamically require modules in
    perl, you have to go through some significant, often unsurmountable, hoops.
    So you can&#039;t easily have dynamic objects of dynamically defined classes. In
    PHP, though, you can require_once or include_once at any time without even
    thinking.
&lt;/p&gt;
&lt;p&gt;
    The final straw, however, was when I did my first OO application in PHP this
    past week. I hammered it out in a matter of an hour or so. Then I rewrote it
    to incorporate Smarty in around an hour. And it all worked easily. Then I
    wrote a form-handling libary in just over two hours that worked immediately
    -- and made it possible for me to write a several screen application in a
    matter of an hour, complete with form, form validation, and database calls.
    Doing the same with CGI::Application took me hours, if not days.
&lt;/p&gt;
&lt;p&gt;
    So, my idea is this: port CGI::Application to PHP. I &lt;em&gt;love&lt;/em&gt; the
    concept of CGI::App -- it&#039;s exactly how I want to program, and I think it&#039;s
    solid. However, by porting it to PHP, I automatically have session and
    cookie support, and database support is only a few lines of code away when I
    use PEAR; I&#039;ll add Smarty as the template toolkit of choice, but make it
    easy to override the template methods to utilize . I get a nice MVC-style
    application template, but one that makes developing quickie applications
    truly a snap.
&lt;/p&gt;
&lt;p&gt;
    This falls under the &quot;right-tool-for-the-job&quot; category; perl, while a
    wonderful language, and with a large tradition as a CGI language, was not
    developed &lt;em&gt;for the web&lt;/em&gt; as PHP was. PHP just makes more sense in this
    instance. And I won&#039;t be abandoning perl by any stretch; I still use it
    daily at work and at home for solving any number of tasks from automated
    backups to checking server availability to keeping my ethernet connection
    alive. But I have real strengths as a PHP developer, and it would be a shame
    not to use those strengths with our home website.
&lt;/p&gt; 
    </content:encoded>

    <pubDate>Sun, 28 Mar 2004 19:24:12 -0500</pubDate>
    <guid isPermaLink="false">http://weierophinney.net/matthew/archives/35-guid.html</guid>
    
</item>
<item>
    <title>HTML::FillInForm</title>
    <link>http://weierophinney.net/matthew/archives/28-HTMLFillInForm.html</link>
            <category>Perl</category>
            <category>Personal</category>
            <category>Programming</category>
    
    <comments>http://weierophinney.net/matthew/archives/28-HTMLFillInForm.html#comments</comments>
    <wfw:comment>http://weierophinney.net/matthew/wfwcomment.php?cid=28</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://weierophinney.net/matthew/rss.php?version=2.0&amp;type=comments&amp;cid=28</wfw:commentRss>
    

    <author>nospam@example.com (Matthew Weier O'Phinney)</author>
    <content:encoded>
    &lt;p&gt;
    The CGI::Application::ValidateRM module utilizes HTML::FillInForm to fill in
    values in the form if portions did not pass validation. Basically, it
    utilizes HTML::Parser to go through and find the elements and match them to
    values. It&#039;s used because the assumption is that you&#039;ve built your form into
    an HTML::Template, and that way you don&#039;t need to put in program logic into
    the form.
&lt;/p&gt;
&lt;p&gt;
    Seems another good candidate for using FillInForm would be to populate a
    form with values grabbed from a database... I should look into that as well!
&lt;/p&gt; 
    </content:encoded>

    <pubDate>Thu, 05 Feb 2004 20:23:17 -0500</pubDate>
    <guid isPermaLink="false">http://weierophinney.net/matthew/archives/28-guid.html</guid>
    
</item>
<item>
    <title>HTML::Template notes</title>
    <link>http://weierophinney.net/matthew/archives/27-HTMLTemplate-notes.html</link>
            <category>Perl</category>
            <category>Personal</category>
            <category>Programming</category>
    
    <comments>http://weierophinney.net/matthew/archives/27-HTMLTemplate-notes.html#comments</comments>
    <wfw:comment>http://weierophinney.net/matthew/wfwcomment.php?cid=27</wfw:comment>

    <slash:comments>1</slash:comments>
    <wfw:commentRss>http://weierophinney.net/matthew/rss.php?version=2.0&amp;type=comments&amp;cid=27</wfw:commentRss>
    

    <author>nospam@example.com (Matthew Weier O'Phinney)</author>
    <content:encoded>
    &lt;p&gt;
    I&#039;ve used HTML::Template a little, mainly in the Secret Santa project I did
    this past Christmas for my wife&#039;s family. One thing I disliked was using the
    normal syntax: &amp;lt;TMPL_VAR NAME=IMAGE_SRC&amp;gt; -- it made looking at it
    difficult (it wasn&#039;t always easy to tell what was an HTML tag, what was
    plain text, and what was HTML::Template stuff), and it made it impossible to
    validate my pages before they had data.
&lt;/p&gt;
&lt;p&gt;
    Fortunately, there&#039;s an alternate syntax: wrap the syntax in HTML comments:
    &amp;lt;!-- TMPL_VAR NAME=IMAGE_SRC --&amp;gt; does the job. It uses more
    characters, true, but it gets highlighted different than HTML tags, as well,
    and that&#039;s worth a lot.
&lt;/p&gt;
&lt;p&gt;
    And why do I have to say &quot;NAME=&quot; every time? That gets annoying. As it turns
    out, I can simply say: &amp;lt;!-- TMPL_VAR IMAGE_SRC --&amp;gt;, and that, too will
    get the job done.
&lt;/p&gt;
&lt;p&gt;
    Finally, what about those times when I want to define a template, but have
    it broken into parts, too? Basically, I want HTML::Template to behave a
    little like SSI. No worries; there&#039;s a TMPL_INCLUDE tag that can do this:
    &amp;lt;!-- TMPL_INCLUDE NAME=&quot;filename.tmpl&quot; --&amp;gt;. 
&lt;/p&gt; 
    </content:encoded>

    <pubDate>Thu, 05 Feb 2004 20:18:20 -0500</pubDate>
    <guid isPermaLink="false">http://weierophinney.net/matthew/archives/27-guid.html</guid>
    
</item>
<item>
    <title>CGI::Application::ValidateRM and Data::FormValidator</title>
    <link>http://weierophinney.net/matthew/archives/26-CGIApplicationValidateRM-and-DataFormValidator.html</link>
            <category>Perl</category>
            <category>Personal</category>
            <category>Programming</category>
    
    <comments>http://weierophinney.net/matthew/archives/26-CGIApplicationValidateRM-and-DataFormValidator.html#comments</comments>
    <wfw:comment>http://weierophinney.net/matthew/wfwcomment.php?cid=26</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://weierophinney.net/matthew/rss.php?version=2.0&amp;type=comments&amp;cid=26</wfw:commentRss>
    

    <author>nospam@example.com (Matthew Weier O'Phinney)</author>
    <content:encoded>
    &lt;p&gt;
    I&#039;ve been reading a lot of posts lately on the CGI::App mailing list about
    using CGI::Application::ValidateRM (RM == Run Mode); I finally went and
    checked it out.
&lt;/p&gt;
    CGI::App::ValRM uses Data::FormValidator in order to do its magic.
    Interestingly, D::FV is built much like how I&#039;ve buit our formHandlers
    library at work -- you specify a list of required fields, and a list of
    fields that need to be validated against criteria, then provide the
    criteria. It goes exactly how I would have done our libraries had we been
    working in perl -- supplying the constraint as a regexp or anonymous sub in
    a hashref for the field.

&lt;p&gt;
    Anyways, it looks like the combination of CGI::App::ValRM with CGI::App
    could greatly simplify any form validations I need to do on the site, which
    will in turn make me very happy!
&lt;/p&gt; 
    </content:encoded>

    <pubDate>Thu, 05 Feb 2004 20:07:43 -0500</pubDate>
    <guid isPermaLink="false">http://weierophinney.net/matthew/archives/26-guid.html</guid>
    
</item>
<item>
    <title>Design Ideas</title>
    <link>http://weierophinney.net/matthew/archives/25-Design-Ideas.html</link>
            <category>Perl</category>
            <category>Personal</category>
            <category>Programming</category>
    
    <comments>http://weierophinney.net/matthew/archives/25-Design-Ideas.html#comments</comments>
    <wfw:comment>http://weierophinney.net/matthew/wfwcomment.php?cid=25</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://weierophinney.net/matthew/rss.php?version=2.0&amp;type=comments&amp;cid=25</wfw:commentRss>
    

    <author>nospam@example.com (Matthew Weier O'Phinney)</author>
    <content:encoded>
    &lt;p&gt;
    I had some success last night with the My::Portal CGI::Application
    superclass I&#039;m building -- I actually got it working with CGI::Wiki::Simple
    (after I debugged the latter to fix some delegation issues!). Now that I
    know the &quot;proof-of-concept&quot; works, I&#039;m ready to start in on some other
    issues.
&lt;/p&gt;
&lt;p&gt;
    The first issue is: how can I specify different directories for different
    applications to search for templates, while retaining the default directory
    so that the superclass can build the final page? I &lt;em&gt;could&lt;/em&gt; always
    simply keep all templates in a single directory and simply prefix them, but
    that seems inelegant, somehow. I&#039;ll need to explore how HTML::Template
    integration works with CGI::App.
&lt;/p&gt;
&lt;p&gt;
    Second, and closely related: how do I want it to look, in the end? I could
    see keeping the design we have -- it&#039;s clean, simple, and yet somehow
    functionally elegant. Okay, I&#039;m exaggerating -- it&#039;s your standard
    three-column with header and footer. But it goes with the idea of blocks of
    content. I need to think about that.
&lt;/p&gt;
&lt;p&gt;
    I saw a design idea for a WikiWikiWeb today, though, that totally changed my
    ideas of how a Wiki should look. I hadn&#039;t been to &lt;a href=&quot;http://en.wikipedia.org&quot;&gt;Wikipedia&lt;/a&gt; for some time,
    but a Google link to Gaston Julia showed up on Slashdot as it shut down a
    site in Australia, and so I visited it. I &lt;em&gt;like&lt;/em&gt; the new design -- it
    separates out the common links needed into a nice left menu, and puts
    a subset of that at the top and bottom of the main column as well, using
    nice borders to visually separate things. I much prefer it to PhpWiki&#039;s
    default style, as well as to anything else I&#039;ve really seen so far relating
    to Wiki layout.
&lt;/p&gt; 
    </content:encoded>

    <pubDate>Wed, 04 Feb 2004 22:43:14 -0500</pubDate>
    <guid isPermaLink="false">http://weierophinney.net/matthew/archives/25-guid.html</guid>
    
</item>
<item>
    <title>conditional use in perl</title>
    <link>http://weierophinney.net/matthew/archives/23-conditional-use-in-perl.html</link>
            <category>Perl</category>
            <category>Personal</category>
    
    <comments>http://weierophinney.net/matthew/archives/23-conditional-use-in-perl.html#comments</comments>
    <wfw:comment>http://weierophinney.net/matthew/wfwcomment.php?cid=23</wfw:comment>

    <slash:comments>2</slash:comments>
    <wfw:commentRss>http://weierophinney.net/matthew/rss.php?version=2.0&amp;type=comments&amp;cid=23</wfw:commentRss>
    

    <author>nospam@example.com (Matthew Weier O'Phinney)</author>
    <content:encoded>
    &lt;p&gt;
    I&#039;ve been struggling with how to use modules at runtime instead of compile
    time (I even wrote about this once before). I finally figured it out:
&lt;/p&gt;
&lt;pre&gt;my $module = &quot;ROX::Filer&quot;;
eval &quot;use $module&quot;;
die &quot;couldn&#039;t load module : $!n&quot; if ($@);
&lt;/pre&gt;
&lt;p&gt;
    Now I just need to figure out how to create objects from dynamic module
    names...!
&lt;/p&gt;
&lt;p&gt;
    &lt;b&gt;Update:&lt;/b&gt; Creating objects from dynamic names is as easy as dynamically
    loading the module at run-time:
&lt;/p&gt;
&lt;pre&gt;my $obj = $module-&gt;new();
&lt;/pre&gt; 
    </content:encoded>

    <pubDate>Sun, 01 Feb 2004 16:03:37 -0500</pubDate>
    <guid isPermaLink="false">http://weierophinney.net/matthew/archives/23-guid.html</guid>
    
</item>
<item>
    <title>Where's that module?</title>
    <link>http://weierophinney.net/matthew/archives/22-Wheres-that-module.html</link>
            <category>Perl</category>
            <category>Personal</category>
    
    <comments>http://weierophinney.net/matthew/archives/22-Wheres-that-module.html#comments</comments>
    <wfw:comment>http://weierophinney.net/matthew/wfwcomment.php?cid=22</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://weierophinney.net/matthew/rss.php?version=2.0&amp;type=comments&amp;cid=22</wfw:commentRss>
    

    <author>nospam@example.com (Matthew Weier O'Phinney)</author>
    <content:encoded>
    &lt;p&gt;
    One continual pain for me with perl is when I need to try to find the
    location of a specific module on my filesystem so that I can examine it
    myself; I end up first having to find out what my @INC path is, then having
    to dig through it until I find the module. Fortunately, I&#039;m not the only
    one; somebody &lt;a href=&quot;http://www.perlmonks.org/index.pl?node_id=274701&quot;&gt;posted a
    solution to this problem&lt;/a&gt; on &lt;a href=&quot;http://www.perlmonks.org&quot;&gt;Perl
    Monks&lt;/a&gt;:
&lt;/p&gt;
&lt;p&gt;
    &lt;b&gt;Updated: &lt;/b&gt; The original listing presented didn&#039;t work! The following
    one, garnered from a comment to the original PM post, &lt;em&gt;does&lt;/em&gt;, and is
    what I&#039;m now using.
&lt;/p&gt;
&lt;pre&gt;#!/usr/bin/perl -w
use strict;

use File::Spec::Functions qw/catfile/;

my @loaded = grep {
    eval &quot;require $_&quot;;
    !$@ ? 1 : ($@ =~ s/(@INC contains: Q@INCE)//, warn (&quot;Failed loading $_: $@&quot;), 0);
} @ARGV;

my @pm = map catfile(split &#039;::&#039;) . (/.pmz/ ? &#039;&#039; : &#039;.pm&#039;), @loaded;

print &quot;@INC{@pm}n&quot;;
__END__

=pod

=head1 NAME

whichpm - lists real paths of specified modules

=head1 SYNOPSIS

  editor `whichpm Bar`

=head1 DESCRIPTION

Analogous to the UN*X command which.

=cut

&lt;/pre&gt;
&lt;p&gt;
    Just place it in your $PATH and let &#039;er rip!
&lt;/p&gt; 
    </content:encoded>

    <pubDate>Tue, 27 Jan 2004 23:15:30 -0500</pubDate>
    <guid isPermaLink="false">http://weierophinney.net/matthew/archives/22-guid.html</guid>
    
</item>

</channel>
</rss>