Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
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;"


In reply to (crazyinsomniac: oh i'm excited) Re: new XML module by crazyinsomniac
in thread new XML module by gav^

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • 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.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (3)
As of 2024-04-25 23:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found