NetSDS...Import(3pm)
π NAME π
NetSDS::Util::FileImport β bestie, this one imports a table structure straight out of a file. that's the whole job. it's giving "I read files so you don't have to" π
it lives in the NetSDS...Import(3pm) page, aka the User Contributed Perl Documentation zone, so you know it's real.
β¨ SYNOPSIS β¨
use NetSDS::Util::FileImport
yes that's it. that's the whole summoning ritual. no cap. πͺ
πΈ DESCRIPTION πΈ
okay so this module is here to pull table structure out of a file. that's the vibe. now let's get into the actual API because that's where the good stuff lives π«Ά
π CLASS API π
import_table() β import table data from file π
this is the main character function, fr fr.
it takes two things:
$contentβ the content of a file. literally the file's insides. π$pre_parseβ true or false. what does that mean? it means: return all table or only 5 first rows. sotrue= just a lil taste test (5 rows),false= the whole entire table. pick your fighter. β¨
the params it could be (this is the raw shape, keep it exact):
patterns => { qr#name#i => { qr#last#i => 'last_name', qr#first#i => 'first_name' } }separatorβ could be,;\t:fields => [ email last_name ]substitute => { E-mail => email, Last Name => last_name, .. }
depends of a params parse would be different π β so like, the way it parses genuinely shifts depending on which params you hand it. not me being mysterious, that's just the actual behavior.
returns a structure like this:
[ { last_name => undef, first_name => yana, ... }, { last_name => kornienko, first_name => test, ... } .. ]
look at that. an arrayref of hashrefs, one per row, undef and all. iconic. π
π heads up bestie: the synopsis line has no trailing semicolon and the params/return values above are written exactly as the page gives them β don't go "fixing" them, that's not your business, that's the documentation's business.
and that's the whole page, periodt. this was NetSDS...Import(3pm) from perl v5.36.0, dated 2022-11-20. mwah, go import something cute ππ§
π¦ where this page comes from
- debian bookworm: libnetsds-util-perl 1.045-2 Β· GPL-2.0-or-later
- debian trixie: libnetsds-util-perl 1.045-2 Β· GPL-2.0-or-later
- ubuntu noble: libnetsds-util-perl 1.045-2 Β· GPL-2.0-or-later
- ubuntu questing: libnetsds-util-perl 1.045-2
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms