PERL/C3/Perl-Module-Library-(CPAN)/Khasi
From Script | Spoken-Tutorial
Time | Narration |
00:01 | Khublei ngi pdiangsngewbha iaphi sha ka Spoken Tutorial halor kumno ban pyndonkam ia ka Perl Module Library kata CPAN |
00:08 | Ha kane ka jinghikai, ngin ia pule ban pyndonkam ia ki modules ba lah don lypa bad ban shna ia ki modules ba thymmai ha ka PERL. |
00:16 | Ban record ia kane ka jinghikai, nga pyndonkam da ka:
Ubuntu Linux 12.04 operating system Perl 5.14.2 bad 'gedit' Text Editor. |
00:28 | Phi lah ban pyndonkam da kano kano ka text editor katkum kamon jong phi. |
00:32 | Ban bud ia kane ka jinghikai, phi dei ban don ia ka jingtip shaphang ka Perl programming. |
00:37 | Lada phim don, te leit sha ki spoken tutorials jong ka Perl ha ka spoken tutorial website. |
00:43 | Modules:
Kine kidei ki code files kiba don ia ki common routines Kiba lah thoh da bun ki nongthoh Bad, lah ban pyndonkam da bun tylli ki programs ha kajuh kapor. |
00:55 | CPAN:PERL kadei ka open source language bad uno uno u lah ban noh synniang sha ka PERL's standard CPAN library. |
01:03 | CPAN kadon bun hajar tylli ki modules ba long ba lah khreh ban pyndonkam ba la thoh da bun ki nongthoh. |
01:09 | Ka official website jong ka CPAN kadei:
www.cpan.org |
01:17 | Ngin ia shim ia ka List colon colon Util kum ka nuksa bad ngin peit kumno ban pyndonkam ia ka. |
01:24 | Kane ka ai access ia nga sha ki functions kiba lah dep thoh lypa hapoh jong kane ka module. |
01:30 | Phai sha ka terminal. |
01:32 | Type: perldoc List colon colon Util. |
01:38 | Phi lah ban ioh ia ka error kaba ong You need to install the perl hyphen doc package to use this program. |
01:46 | Kane ka thew, ba phi donkam ban install ia ka perl hyphen doc package. |
01:50 | Leh ia kane da kaba pyndonkam ia ka Synaptic Package Manager. |
01:55 | Sngewbha leh katkum ki spoken tutorials ba iadei jong ka Linux ha ka spoken tutorial website. |
02:01 | Kaei kaba phi iohi hangne kadei ka documentation na ka bynta ka List colon colon Util module. |
02:08 | Kynmaw ba ka documentation kadon ia-
Ka jingbatai jong ka module, Ka nuksa kumno ban pyndonkam ia ka Bad ka overview. |
02:20 | Shon ia u 'Q' key ban khang ia ka perldoc viewer. |
02:25 | Hadien kane, ngin sa iohi kumno ban pyndonkam ia ka List colon colon Util module ha ka Perl program |
02:33 | To ngan plie ia ka sample program exist underscore modules.pl kaba nga lah dep save lypa. |
02:40 | Ha ka exist underscore modules dot pl file jong phi, type ia u code harum kumba la pyni ha ka screen. |
02:47 | To mynta ngin ia pyrshang ban sngewthuh ia u code. |
02:50 | use List colon colon Util ka iathuh ia ka Perl ban wad bad load ia ka module List colon colon Util. |
03:00 | qw() function kasei shabar ia ki kyntien jong ka string da kaba pyndonkam ia ka delimiter bad ka pynphai ia ki kyntien kum ka list. |
03:09 | Kadei tang ka rukom kaban stet ban declare ia ka array. |
03:13 | Ha kapor ba import ia ka module, ka imports tang ia ki subroutines ba lah kdew ha ka list |
03:21 | Ka don ha ka ia ka general-utility list jong ki subroutines. |
03:26 | Ka module kan sa export ia ki subroutines jong ka bad variables hapoh ka program jong ngi. |
03:32 | Ki subroutines kiba kham paw kiba don ha ka List colon colon Util kidei:
first – kiba pynphai ia ka element ba nyngkong ha ka list. |
03:42 | max – u pynphai ia u numerical value ba heh duh ha ka list. |
03:47 | maxstr- u pynphai ia u string ba heh duh ha ka list. |
03:52 | min- u pynphai ia ka numerical value ba rit duh. |
03:57 | minstr – u pynphai ia ka string ba rit duh ha ka list. |
04:02 | shuffle – u pynphai ia ki values jong ka input ha ka random order. |
04:08 | sum – u pynphai ia ka numerical sum jong baroh ki elements ha ka list. |
04:14 | Ym donkam ban da thoh la kajong ka source code na ka bynta man ka function. |
04:18 | Ngi lah ban shu pyndonkam ia kine ki subroutines kiba don ha ka program jong ngi. |
04:23 | Kine kidei ki inputs kiba nga pyndonkam ha ka function max, min, sum bad shuffle. |
04:30 | Bad kine kidei ki print statements. |
04:33 | Mynta, shon Ctrl+S ban save ia ka file. |
04:37 | To ngin ia execute ia ka program. |
04:40 | Phai biang sha ka terminal bad type: perl exist underscore modules dot pl bad shon Enter. |
04:49 | Khmih ia ka output. |
04:51 | Ha ka Random number, phi lah ban ioh uno uno u value hapdeng u 0 bad 51. |
04:58 | Hadien kane, ngin sa iohi kumno ban shna ia ka Perl module ba thymmai bad pyndap ia ka ha ka CPAN. |
05:04 | Kine harum kidei ki steps ban shna ia ka module: |
05:08 | Shna ia ka jaka ban thep ia ka module. |
05:11 | Shna ia ka skeleton files na ka bynta ka module. |
05:14 | Document ia ka module. |
05:16 | Thoh ia ka Perl code. |
05:18 | Thoh ia u code na ka bynta ka testing. |
05:20 | Sam ia ka module ha ka CPAN. |
05:24 | Ka Perl ka lah sam ryngkat ka program kaba kyrteng h2xs kaba pyndonkam ban sei ia ki files na ka bynta ka module ba thymmai. |
05:32 | Math colon colon Simple ka kdew ia ka kyrteng jong ka module jong ngi.. |
05:37 | Ia kane la pyndonkam ban sei ia ka directory kaba dei ban batai shai ia ka module ba kadon. |
05:43 | Bunsien ka shna ia ka skeleton files na ka bynta ka module. hyphen PAX kidei ki options kiba pynmih ia ka autoload bad autogenerate. |
05:54 | To ngin ia shna ia module ba thymmai-Math colon colon Simple. |
05:59 | Kan sa ai bad ki simple functions: add, subtract, multiply bad divide. |
06:06 | To ngin ia phai sha ka terminal bad execute ia ka h2xs command. |
06:12 | Type: h2xs hyphen PAXn Math colon colon Simple. |
06:20 | Ka h2xs program ka sei ia baroh kine ki files kiba donkam ban sam ia ka module. |
06:27 | To ngin ia pynkylla ia ka directory sha ka Math hyphen Simple. |
06:33 | Kynmaw ia ka directory path ha ka machine jong phi. Ka lah ban long kum Math forward slash Simple. |
06:41 | Type "ls" ban list ia baroh ki files ha ka directory. Ngi lah ban iohi ia ki files harum. |
06:49 | Ka "Changes" file kadei ha kaba ngin bud dien ia ki jingpynkylla, ba leh ha ka module jong ngi, mynba ngi thoh ia ka versions ba thymmai. |
06:58 | lib subdirectory ka don ia ki module. |
07:02 | MANIFEST ka don ia ka list jong ki files ha kane ka directory. |
07:07 | Makefile kadei ka Perl program ba pyndonkam ha kaban shna ia ka Unix Makefile. |
07:12 | Ngin ia pyndonkam ia kane ka Makefile ban text bad install ia ka module jong ngi. |
07:18 | Test scripts kan don ha ka 't' subdirectory. |
07:22 | Ki tests kidei ki simple Perl scripts, hynrei bad u dot t extension la pyndonkam na ka bynta ka unit testing. |
07:30 | Simple.pm kadei ka module jong ngi. |
07:34 | Baroh kine ki files ki lah sei hi dalade ynda ngi execute ia ka h2xs command. |
07:41 | To ngin ia plie ia ka simple.pm file. |
07:45 | Pynkylla ia ka directory sha ka lib forward slash Math. |
07:51 | Mynta, ngin ia plie ia ka simple.pm file ban iohi ia ka content ba lah don lypa. |
07:57 | Type: gedit Simple.pm. |
08:02 | Kaei kaba ngi iohi hangne kadei ka documented, Perl module ba treikam kaba khlem leh eiei ruh em. |
08:09 | Ngi hap ban thoh ia ki functions kiba donkam ha kane ka file ban pynlong ia ka ba kan leh eiei. |
08:16 | Pyndap ia u code harum hadien jong ka text: "Preloaded methods go here". |
08:22 | Hangne, ngin ia pyndap saw tylli ki subroutines add, subtract, multiply bad divide. |
08:29 | Mynta, shon Ctrl+S ban save ia ka file. |
08:33 | Mynta, to ngin ia shna ia ka sample Perl program ban test ia u code jong ngi ban pynthikna ba ka lah treikam pura. |
08:41 | To ngin ia plie ia ka test file Math-Simple.t hapoh ka subdirectory 't'. |
08:49 | Type: gedit Math-Simple.t |
08:55 | Pyndap ia u code harum hadien jong u code ba lah don lypa: “Insert your test code below..”. |
09:02 | Ka Print statements kan sa print ia ka output. |
09:06 | Mynta, shon Ctrl+S ban save ia ka file. |
09:10 | To ngin ia run ia ka test script. |
09:13 | Type: perl Math-simple.t bad shon Enter. |
09:19 | Ngi iohi ia kane ka error message namar ka Perl script kam lap ia ka Simple.pm ha ka directory jong ka. |
09:27 | Kadei ban peit hapoh jong ka lib directory. Kumno ngin pynbeit ia kane ka jingbakla? |
09:33 | To ngin ia peit katto katne ki options na ka bynta kane. |
09:37 | At the rate INC udei u variable ba kyrpang uba don ia ki list jong ki directories. |
09:43 | Perl modules bad libraries lah ban load na kine ki directories. |
09:48 | Kane ka lain jong u code ka iathuh ia ka Perl program ban pyndap ia kane ka directory path sha ka at the rate INC search directory jong ka. |
09:57 | Da kawei pat ka rukom, ngi lah ban pyndap ia ki files sha ka at the rate INC ha ka run time da kaba pyndonkam ia ka '-I' option. |
10:06 | Mynta, to ngin ia phai sha ka terminal. |
10:10 | Ngan execute ia ka program da kaba pyndonkam ia ka '-I' command line parameter. |
10:16 | Te, ngan type: perl -Ilib t/Math-Simple.t |
10:24 | Hangne ka output kumba ngi khmih lynti. |
10:27 | Ngi lah dep test ia ka module bad ka treikam bha. |
10:31 | Ka step kaba khatduh kadei ban sam ia ka module. |
10:34 | Ka rukom ba dei ban leh ban install ia ka module kadei ban run ia kine ki commands. |
10:40 | Ka installation ka kynthup ia ka jing copy ia ki files sha kaPerl library directory. |
10:45 | Bun na ngi ngim don ia ka permission ban copy hapoh kane ka directory. |
10:49 | Namar ba ka Math-Simple kam dei ka module kaba donkam than haduh katta katta, ngan nym batai hangne ia ka bynta jong ka installation. |
10:57 | Da kane ngi lah poi sha kaba kut jong kane ka jinghikai. To ngin ia batai kyllum. |
11:02 | Ha kane ka jinghikai, ngi lah pule ban:
Pyndonkam ia ki modules ba lah don lypa Shna ia ki modules ba thymmai bad kumno ban pyndonkam ia ka Perl program. |
11:11 | Hangne ka kam na ka bynta jong phi. |
11:13 | Pyndonkam ia ka Text colon colon Wrap module. |
11:17 | Pyndonkam ia ka Wrap() function kaba lum lang ia ka input text ban pynlong ia ki paragraphs kiba itynnad. |
11:24 | Text colon colon Wrap module kadon ia u variable- "columns". Set ia columns value sha 30. |
11:31 | Print ia ka text ban iohi ia ka formatted output. |
11:35 | Ka video ha ka link harum ka batai kyllum ia ka Spoken Tutorial project. Sngewbha download bad peit ia ka. |
11:42 | Ka kynhun jong ka Spoken Tutorial Project :
Ka pynlong ia ki workshops da kaba pyndonkam ia ki spoken tutorials bad ka ai certificates sha kito kiba pass ha ka online tests. |
11:51 | Na ka bynta ki jingtip ba bniah, sngewbha thoh sha ngi. |
11:55 | Ia ka Spoken Tutorial project la bei tyngka da ka NMEICT, MHRD, Sorkar India. |
12:02 | Kham bun ki jingtip halor kane ka mission kidon ha kane ka link. |
12:06 | Ma nga u Pdiangburom na Shillong, nga pynkut ia kane. Khublei shibun. |