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).
-
Are you posting in the right place? Check out Where do I post X? to know for sure.
-
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
<u> <ul>
-
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).
-
Want more info? How to link
or How to display code and escape characters
are good places to start.