It does not belong in the XML:: namespace any more than it does on CPAN (waste of space).# $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 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^?
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 likepackage 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__
so all that would ever be printed out is HASH(0x263d8f8) or ARRAY(ox263d8f8) or some such useless tidbit.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; }
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;" |
In reply to (crazyinsomniac: oh i'm excited) Re: new XML module
by crazyinsomniac
in thread new XML module
by gav^
For: | Use: | ||
& | & | ||
< | < | ||
> | > | ||
[ | [ | ||
] | ] |