in reply to new XML module

I can't believe grantm posted this, here is the entire module (minus pod)
# $Id: Simpler.pm,v 1.0 2002/04/01 00:00:00 grantm Exp $ package XML::Simpler; use strict; use warnings; require Exporter; use File::Slurp; use vars qw(@ISA @EXPORT $VERSION); @ISA = qw(Exporter); @EXPORT = qw( XMLin XMLout ); $VERSION = '1.00'; sub XMLin { read_file ( $_[0] ) } sub XMLout { write_file( $_[1], $_[0]) } 1; __END__
It does not belong in the XML:: namespace any more than it does on CPAN (waste of space).

It does not parse XML in any way shape or form, nor does it do anything remotely useful or entertaining.

I too am excited , I can't believe grantm's selfishness (CPAN is not a crap factory).

Why are you excited gav^?

package XML::Simpler; use strict; use warnings; require Exporter; use vars qw(@ISA @EXPORT $VERSION); @ISA = qw(Exporter); @EXPORT = qw( XMLin XMLout ); $VERSION = '1.00'; sub XMLin { my $file = shift; my @lines(); open(FILE,$file) or die "couldn't open $file $!"; while(<FILE>) { my $line = $_; push @lines, \$line; } close(FILE); return @lines; } 1; __END__
Certainly excites me, but not as much as the fact that the XMLout function does not work very well, since File::Slurp's write_file looks like
sub write_file { my ($f, @data) = @_; local(*F); open(F, ">$f") || croak "open >$f: $!"; (print F @data) || croak "write $f: $!"; close(F) || croak "close $f: $!"; return 1; }
so all that would ever be printed out is HASH(0x263d8f8) or ARRAY(ox263d8f8) or some such useless tidbit.

Man oh man am I excited, so much so that I am going to write to grantm, and tell everybody I know to avoid his CPAN directory.

update (posted 4 minutes after this node was created, before dws/shotgunefx replied): the fact that "Version 1.00 of XML::Simpler was released on April 1st, 2002" further excites me (is nothing sacred anymore, must everything be tainted in such a disgusting manner).

 
______crazyinsomniac_____________________________
Of all the things I've lost, I miss my mind the most.
perl -e "$q=$_;map({chr unpack qq;H*;,$_}split(q;;,q*H*));print;$q/$q;"

Replies are listed 'Best First'.
Re: (crazyinsomniac: oh i'm excited) Re: new XML module
by shotgunefx (Parson) on Apr 02, 2002 at 08:26 UTC
    This is the only April Fool's joke I actually noticed this year. I agree about cluttering CPAN. Also the slight name deviation will most likely cause some installers a headache at some point. He could have made his joke without actually throwing it up there with a note on use.perl or something with a link to a mock up.

    Though I must repent and confess I chuckled at
    In the absence of hash keys and array indexes, users will need to adopt different techniques for extracting individual data values. The most popular approach will likely be regular expressions but this is Perl and there is always more than one way to do it, so split() and substr() are likely to be popular alternatives.

    -Lee

    "To be civilized is to deny one's nature."

      Joke or no joke, this should NOT be in CPAN, this should NOT be work load for testers. I wonder why this module (the namespace for it) was not rejected - can any fool add his own favourite Foo::Bar::Broken?

      Now, beginners will think this module is real, and try to use it. That means a waste of development time and it's a very bad name for Perl and the CPAN.

      Maybe if it was named Acme::XML::Simpler, or XML::Simpleminded, maybe I could laugh.

      U28geW91IGNhbiBhbGwgcm90MTMgY
      W5kIHBhY2soKS4gQnV0IGRvIHlvdS
      ByZWNvZ25pc2UgQmFzZTY0IHdoZW4
      geW91IHNlZSBpdD8gIC0tIEp1ZXJk
      

        I think we are saying the same thing. As to whether any fool can add his own Foo::Bar::Broken, yes they can.

        From pause
        Apply for namespace registration

        Please use this form to apply for the registration of a namespace for a module you have written or are going to write. The request will be sent off to the modules@perl.org people who are maintaining the Modules List. A registration is not a prerequisite for uploading. It is just recommended for better searchability of the CPAN and to avoid namespace clashes. You will be notified when the registration is approved but you can upload immediately, there's no need to wait for an approval.


        -Lee

        "To be civilized is to deny one's nature."
Re: (crazyinsomniac: oh i'm excited) Re: new XML module
by Anonymous Monk on Apr 02, 2002 at 11:32 UTC
    OK, I'm here to face the music!

    I really appreciate the work of CPAN Testers and I apologise to any of them who wasted time as a result of my upload.

    There is a history of amusing modules being uploaded to CPAN on April 1st. As far as I can tell, the key difference between previous ones (eg: Sex, DNA, Bleach, Buffy) and mine was that XML::Simpler did not contain obfuscated Perl code. I would argue that mine is no more or less useful than the other packages. It does work exactly as the documentation describes.

    I think it would be a bit silly of people to boycott my XML::Simple module merely because they didn't like my upload of XML::Simpler. I'm sorry if people feel that way.

    Humour is in the eye of the beholder and clearly some people in this forum were not amused.

    Once again, I apologise - I intended no offence.

    Grant
      Sorry about the anonymous bit - I thought I'd logged in.
        grantm,

        Yesterday I searched cpan for xml and noticed XML::Simpler thinking it was real. Today XML::Simpler? comes along. After reading through this thread a thought occurred to me. You've answered the complaints about this joke module with several apologies and seem to agree with most of the criticism. Since entirely deleting modules is impossible (?) why not update the module to a new version that really does what its name suggests?

        As an XML newbie two problems that plagued me were 1. killing the parser with bad input, and 2. getting back a different character encoding than was input. Perhaps you could come up with some mechanism for helping newbies solve the common XML problems. Maybe it could be a "tutorial module" with training wheels like helpful die messages and suggestions for correcting the errors, explaining the subtle gotchas of XML parsing. After which they'd be ready to graduate to XML::Simple (which btw I've used in all my XML scripts thus far, listed in my sig).

        Thanks for reading this far, and for XML::Simple!

        --
        Check out my Perlmonks Related Scripts like framechat, reputer, and xNN.

      As far as I can tell, the key difference between previous ones (eg: Sex, DNA, Bleach, Buffy) and mine was that XML::Simpler did not contain obfuscated Perl code.

      That's not the point. "Sex" is obviously not serious, DNA is useable, and the synopsis makes clear it's just for fun. Both Bleach and Buffy are in the Acme:: namespace, home of useless, but fun modules.

      XML::Simpler is in the XML:: namespace, and will be found when anyone searches for XML or XML::Simple. A lot of people want ease of use, and will install XML::Simpler before trying XML::Simple. They'll find out it's useless and might give up on trying other modules, because even the simplest doesn't work.

      Had you named it Acme::XML::Simpler, there would be no problem.

      As modules can't be deleted easily, I urge you to add a very verbose and clear statement at the top of your POD, add a warning to the code itself, and release version 1.01. Then, request it to be deleted, and if you like, re-submit it under the Acme:: namespace.

      I would argue that mine is no more or less useful than the other packages. It does work exactly as the documentation describes.

      Have you seen my latest module?

      package Null; use v5.6.0 use strict; our $VERSION = '1.00'; __END__ =head1 NAME Null - Does absolutely nothing =head1 SYNOPSIS use Null; =head1 DESCRIPTION This module only sets $Null::VERSION, but does nothing else. =head1 COPYRIGHT None is claimed. This module is released into the public domain. =cut
      This module (though untested) does _EXACTLY_ that what is documented. But it should NOT be in CPAN.

      U28geW91IGNhbiBhbGwgcm90MTMgY
      W5kIHBhY2soKS4gQnV0IGRvIHlvdS
      ByZWNvZ25pc2UgQmFzZTY0IHdoZW4
      geW91IHNlZSBpdD8gIC0tIEp1ZXJk
      

        Modules can be deleted. In fact PAUSE is urging people to delete things, in order to keep CPAN 'CDROM-able'. As an example, try to find XML::Simpler on CPAN now. OTOH, this is now stuck in BACKPAN for eternity.

        --
        perl -pew "s/\b;([mnst])/'$1/g"

Re: (crazyinsomniac: oh i'm excited) Re: new XML module
by shotgunefx (Parson) on Apr 02, 2002 at 08:53 UTC
    Just an aside, I think gav^'s post was intended with a ; )

    -Lee

    "To be civilized is to deny one's nature."
        As I had stated in my first reply, I think it was dumb of him to do this. He could have achieved virtually the same laugh without mucking up CPAN. I just thought there was a bit of the "shoot the messanger" in your first reply to gav^ but it was probably just me.

        -Lee

        "To be civilized is to deny one's nature."
Re: (crazyinsomniac: oh i'm excited) Re: new XML module
by dws (Chancellor) on Apr 02, 2002 at 08:30 UTC
    ... here is the entire module (minus pod)... It does not parse XML in any way shape or form, nor does it do anything remotely useful or entertaining.

    The joke, such as it is, is in the POD. Try re-reading the module minus code.

    But you're right. This is a waste of CPAN cycles.

    A reply falls below the community's threshold of quality. You may see it by logging in.
Re: (crazyinsomniac: oh i'm excited) Re: new XML module
by gav^ (Curate) on Apr 02, 2002 at 14:07 UTC
    Sorry, my post should have had a big ':)' at the end. I found the POD docs to be quite entertaining. I assumed that it would be deleted it from CPAN in a couple of days with no harm done.

    gav^

      Indeed it will
Re: (crazyinsomniac: oh i'm excited) Re: new XML module
by Masem (Monsignor) on Apr 02, 2002 at 12:31 UTC
    I agree with CI's feeling that an April Fool's joke should not be waiting space in what is normally considered to be a utility like CPAN. Although I will point out that there are a handful of modules that their respective authors describe as "curiousities" (such as Quantum::Superposition by Damian) that have a low utility value. This is not to say that they aren't useful; typically the programming behind the module is serious enough to be used as learning code, or there's an unseen but possible useful implmentation of the module - an example here would be using Q:S to actually work out how one would lay out a quantum computer and make sure that there's a reasonable approach to the problem solution in non-quantum space.

    But yea, XML::Simpler doesn't offer either. It's a gag, and should have been limited to discussion groups like here or perlxml, or even something like an article at ORA (with an approiate post-fix to clue those in not already on the joke).

    -----------------------------------------------------
    Dr. Michael K. Neylon - mneylon-pm@masemware.com || "You've left the lens cap of your mind on again, Pinky" - The Brain
    "I can see my house from here!"
    It's not what you know, but knowing how to find it if you don't know that's important