Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision e95294b5

Von Bernd Bleßmann vor fast 11 Jahren hinzugefügt

  • ID e95294b56b3e6b51c96f35add267b4dc58fe47d7
  • Vorgänger 01a4e61c
  • Nachfolger 3250ebcf

Csv-Helper lässt header als einfaches Arrayref bei Nicht-Multiplex-Daten zu.

Unterschiede anzeigen:

t/helper/csv.t
12 12

  
13 13
my $csv = SL::Helper::Csv->new(
14 14
  file    => \"Kaffee\n",       # " # make emacs happy
15
  header  => [[ 'description' ]],
15
  header  => [ 'description' ],
16 16
  profile => [{ class  => 'SL::DB::Part', }],
17 17
);
18 18

  
......
29 29

  
30 30
$csv = SL::Helper::Csv->new(
31 31
  file    => \"Kaffee;0.12;12,2;1,5234\n",            # " # make emacs happy
32
  header  => [[ 'description', 'sellprice', 'lastcost_as_number', 'listprice' ]],
32
  header  => [ 'description', 'sellprice', 'lastcost_as_number', 'listprice' ],
33 33
  profile => [{profile => { listprice => 'listprice_as_number' },
34 34
               class   => 'SL::DB::Part',}],
35 35
);
......
273 273

  
274 274
$csv = SL::Helper::Csv->new(
275 275
  file   => \"Kaffee",       # " # make emacs happy
276
  header =>  [[ 'description' ]],
276
  header =>  [ 'description' ],
277 277
  profile => [{class  => 'SL::DB::Part'}],
278 278
);
279 279
$csv->parse;
......
296 296

  
297 297
$csv = SL::Helper::Csv->new(
298 298
  file   => \"Kaffee",          # " # make emacs happy
299
  header =>  [[ 'Description' ]],
299
  header =>  [ 'Description' ],
300 300
  case_insensitive_header => 1,
301 301
  profile => [{
302 302
    profile => { description => 'description' },
......
320 320

  
321 321
$csv = SL::Helper::Csv->new(
322 322
  file   => \"Kaffee",            # " # make emacs happy
323
  header => [[ 'Description' ]],
323
  header => [ 'Description' ],
324 324
  profile => [{class  => 'SL::DB::Part'}],
325 325
);
326 326
$csv->parse;
......
330 330

  
331 331
$csv = SL::Helper::Csv->new(
332 332
  file   => \"Kaffee",            # " # make emacs happy
333
  header => [[ 'foo' ]],
333
  header => [ 'foo' ],
334 334
  profile => [{
335 335
    profile => { foo => '' },
336 336
    class  => 'SL::DB::Part',
......
345 345

  
346 346
$csv = SL::Helper::Csv->new(
347 347
  file   => \"Kaffee",            # " # make emacs happy
348
  header => [[ 'foo' ]],
348
  header => [ 'foo' ],
349 349
  strict_profile => 1,
350 350
  profile => [{
351 351
    profile => { foo => '' },
......
359 359

  
360 360
$csv = SL::Helper::Csv->new(
361 361
  file   => \"Phil",            # " # make emacs happy
362
  header => [[ 'CVAR_grOUnDHog' ]],
362
  header => [ 'CVAR_grOUnDHog' ],
363 363
  strict_profile => 1,
364 364
  case_insensitive_header => 1,
365 365
  profile => [{

Auch abrufbar als: Unified diff