Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: Parsing XML into a Hash

by maverick (Curate)
on Nov 04, 2003 at 17:18 UTC ( #304481=note: print w/replies, xml ) Need Help??


in reply to Parsing XML into a Hash

Here's what I suggest that you do.
use strict; use warnings; use Clue::ByFour; use Existing::Client; my $clueX4 = new Clue::ByFour; my $client = new Existing::Client; $clueX4->add("rusty nail"); $clueX4->target($client); for (0..1000) { $clueX4->swing(); }
Seriously. You need to at least make an attempt to enlighten the client about the Right Way (TM) to do this. You may THINK you have control over the format of the file, but some day down the line (sooner rather than later) and you or whoever works on this after you is in for a world of hurt. Security people are NOTORIOUSLY stupid about this sort of thing...they have policies that they have sat around and dreamed up and never even really considered the intelligence of.

You should have enough pride in your work to be SERIOUSLY po-ed about being asked to write shoddy 2nd rate code because of PHB's in the first place.

/\/\averick
OmG! They killed tilly! You *bleep*!!

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://304481]
help
Chatterbox?
[erix]: hm, where's tux when you need him?
[ELISHEVA]: what's curiouser is that the underlying Text::CSV_XS appears to be BOM-friendly
[afoken]: DBD::CSV has a csv_class attribute. You could subclass Text::CSV_XS to handle BOMs, e.g. through File::BOM.
[ELISHEVA]: Text::CSV_XS already can handle boms - see its detect_bom flag
[ELISHEVA]: but it seems that the DBD::CSV layer on top of it doesn't
[afoken]: Also: All other attributes that start with csv_ and are not described above will be passed to Text::CSV_XS (without the csv_ prefix).
[Discipulus]: what about a good 'ol SOPW?
[erix]: Giro d'Italia won by Dumoulin (peccato Nibali)
[ELISHEVA]: csv_detect_bom doesn't work either
[erix]: (SCNR)

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (8)
As of 2017-05-28 20:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?