Perl programs *can* have user friendly error messages! One technique, inspired by Microsoft software, has now been implemented for Perl using a source filter.

Can't open foo.txt: Unknown error at test.pl line 2.

  • http://search.cpan.org/author/JUERD/Filter-Microsoft-4.01/Microsoft.pm

    Juerd
    - http://juerd.nl/
    - spamcollector_perlmonks@juerd.nl (do not use).
    

    • Comment on New module makes having Microsoft-ish user friendly error messages very easy
    • Download Code
  • Replies are listed 'Best First'.
    Re: New module makes having Microsoft-ish user friendly error messages very easy
    by jmcnamara (Monsignor) on Apr 01, 2003 at 15:31 UTC

      Now all we need is a paperclip pragma. :-)
      You seem to be opening a text file: Would you like help with that? $^O ne MSWin32 at -e line 1: Would you like to install WindowsXP?

      --
      John.

    Re: New module makes having Microsoft-ish user friendly error messages very easy
    by Aristotle (Chancellor) on Apr 01, 2003 at 18:07 UTC
      Not to be the party pooper (I do appreciate the joke), but shouldn't that have been in the Acme namespace?

      Makeshifts last the longest.

        Not to be the party pooper (I do appreciate the joke), but shouldn't that have been in the Acme namespace?

        Yes and no. Yes, because it is a nonsense module. But it is documented properly (it is technically correct) and there is not much chance someone doesn't notice this is a joke. It even has unit tests (well, one test and 1233 unconditional "ok"s :).

        Besides that, the module will of course be deleted from CPAN tomorrow.

        Juerd
        - http://juerd.nl/
        - spamcollector_perlmonks@juerd.nl (do not use).
        

          Hmmm - I like it -- when can we expect Gtk::BlueScreen ?

          btw does it also work when using die $! instead of die "$!" ?
          --
          Jaap Karssenberg || Pardus (Larus)? <pardus@cpan.org>
          >>>> Zoidberg: So many memories, so many strange fluids gushing out of patients' bodies.... <<<<

        No doubt. This looks like definate Handy dandy CPAN pollution to me.

        Does your hypocrisy have no limits? To quote yourself:

        Clearly he doesn't understand CPAN.

        Anyhow, I don't care. Mess CPAN up all you like.

          This looks like definate Handy dandy CPAN pollution to me. Does your hypocrisy have no limits?

          Yes, this is pollution. Every April fool's joke is unclean in one way or another. For some reason, if you say it is a joke (Like "This is an April fool's joke" in the Gentoo newsletter or a module in the Acme:: namespace), it is no longer funny.

          Anyway, Filter::Microsoft is not here to stay. CPAN should be a clean place, 364 days a year :)

          Juerd
          - http://juerd.nl/
          - spamcollector_perlmonks@juerd.nl (do not use).