[30616] in Perl-Users-Digest
Perl-Users Digest, Issue: 1861 Volume: 11
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Sep 18 03:09:39 2008
Date: Thu, 18 Sep 2008 00:09:07 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Thu, 18 Sep 2008 Volume: 11 Number: 1861
Today's topics:
Re: language - plea for help (fidokomik\)
Re: language - plea for help <jwkenne@attglobal.net>
Re: language - plea for help (fidokomik\)
Re: language - plea for help <peter@makholm.net>
new CPAN modules on Thu Sep 18 2008 (Randal Schwartz)
Re: pack and byte length. <ben@morrow.me.uk>
Re: pack and byte length. <fabrice.gautier@gmail.com>
Re: pack and byte length. <ben@morrow.me.uk>
Re: Segmentation fault: problem with perl threads <nitte.sudhir@gmail.com>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Thu, 18 Sep 2008 02:41:27 +0200
From: "Petr Vileta \(fidokomik\)" <stoupa@practisoft.cz>
Subject: Re: language - plea for help
Message-Id: <gasaoc$aq0$1@adenine.netfront.net>
Jrgen Exner wrote:
>> but this function lie about some languages. For example Czech
>> language should be 'CZ' but this function return 'CS'.
>>
>> On Linux I expect 'cs_cz' for Czech language but on some distro I
>> get 'cs_cs'.
>>
> You may want to double check your codes. It seems you are confusing
> language and country. Those are two very different things although
> they might coincide for some locales..
>
OK, I must re-formulate my plea ;-)
Can anybody help me to create table for most used languages and all its locale
codes?
Langugage All possible locales
----------------------------------------------
Czech cs, cz
Slovak sk?
English en, us
German de?
Danish da
French fr?
Spanish
Russian
The purpose is to switch application language at start time to user's locale
setting. In other word, when German user have locale set to French, then
application will start in French language and app's Help will be French too.
Maybe this table can help to another programmers too.
I'm interested in both Linux and Windows locale codes.
--
Petr Vileta, Czech republic
(My server rejects all messages from Yahoo and Hotmail.
Send me your mail from another non-spammer site please.)
Please reply to <petr AT practisoft DOT cz>
-- Posted on news://freenews.netfront.net - Complaints to news@netfront.net --
------------------------------
Date: Wed, 17 Sep 2008 22:33:11 -0400
From: John W Kennedy <jwkenne@attglobal.net>
Subject: Re: language - plea for help
Message-Id: <48d1bde6$0$4980$607ed4bc@cv.net>
Petr Vileta (fidokomik) wrote:
> Jürgen Exner wrote:
>>> but this function lie about some languages. For example Czech
>>> language should be 'CZ' but this function return 'CS'.
>>>
>>> On Linux I expect 'cs_cz' for Czech language but on some distro I
>>> get 'cs_cs'.
>>>
>> You may want to double check your codes. It seems you are confusing
>> language and country. Those are two very different things although
>> they might coincide for some locales..
>>
>
> OK, I must re-formulate my plea ;-)
> Can anybody help me to create table for most used languages and all its
> locale codes?
>
> Langugage All possible locales
> ----------------------------------------------
> Czech cs, cz
> Slovak sk?
> English en, us
> German de?
> Danish da
> French fr?
> Spanish
> Russian
>
> The purpose is to switch application language at start time to user's
> locale setting. In other word, when German user have locale set to
> French, then application will start in French language and app's Help
> will be French too.
> Maybe this table can help to another programmers too.
>
> I'm interested in both Linux and Windows locale codes.
Unfortunately, I cannot give you those, but here's a list from MacOS:
ar: Arabic(ar,ara): العربية
ar_AE: Arabic(ar,ara)-United Arab Emirates(AE,ARE): العربية-الإمارات: AED/AED/د.إ.
ar_BH: Arabic(ar,ara)-Bahrain(BH,BHR): العربية-البحرين: BHD/BHD/د.ب.
ar_DZ: Arabic(ar,ara)-Algeria(DZ,DZA): العربية-الجزائر: DZD/DZD/د.ج.
ar_EG: Arabic(ar,ara)-Egypt(EG,EGY): العربية-مصر: EGP/EGP/ج.م.
ar_IQ: Arabic(ar,ara)-Iraq(IQ,IRQ): العربية-العراق: IQD/IQD/د.ع.
ar_JO: Arabic(ar,ara)-Jordan(JO,JOR): العربية-الأردن: JOD/JOD/د.أ.
ar_KW: Arabic(ar,ara)-Kuwait(KW,KWT): العربية-الكويت: KWD/KWD/د.ك.
ar_LB: Arabic(ar,ara)-Lebanon(LB,LBN): العربية-لبنان: LBP/LBP/ل.ل.
ar_LY: Arabic(ar,ara)-Libya(LY,LBY): العربية-ليبيا: LYD/LYD/د.ل.
ar_MA: Arabic(ar,ara)-Morocco(MA,MAR): العربية-المغرب: MAD/MAD/د.م.
ar_OM: Arabic(ar,ara)-Oman(OM,OMN): العربية-سلطنة عمان: OMR/OMR/ر.ع.
ar_QA: Arabic(ar,ara)-Qatar(QA,QAT): العربية-قطر: QAR/QAR/ر.ق.
ar_SA: Arabic(ar,ara)-Saudi Arabia(SA,SAU): العربية-السعودية: SAR/SAR/ر.س.
ar_SD: Arabic(ar,ara)-Sudan(SD,SDN): العربية-السودان: SDG/SDG/ج.س.
ar_SY: Arabic(ar,ara)-Syria(SY,SYR): العربية-سوريا: SYP/SYP/ل.س.
ar_TN: Arabic(ar,ara)-Tunisia(TN,TUN): العربية-تونس: TND/TND/د.ت.
ar_YE: Arabic(ar,ara)-Yemen(YE,YEM): العربية-اليمن: YER/YER/ر.ي.
be: Belarusian(be,bel): беларускі
be_BY: Belarusian(be,bel)-Belarus(BY,BLR): беларускі-Беларусь: BYR/BYR/Руб
bg: Bulgarian(bg,bul): български
bg_BG: Bulgarian(bg,bul)-Bulgaria(BG,BGR): български-България: BGN/BGN/лв.
ca: Catalan(ca,cat): català
ca_ES: Catalan(ca,cat)-Spain(ES,ESP): català-Espanya: EUR/EUR/€
cs: Czech(cs,ces): čeština
cs_CZ: Czech(cs,ces)-Czech Republic(CZ,CZE): čeština-Česká republika: CZK/CZK/Kč
da: Danish(da,dan): dansk
da_DK: Danish(da,dan)-Denmark(DK,DNK): dansk-Danmark: DKK/DKK/kr
de: German(de,deu): Deutsch
de_AT: German(de,deu)-Austria(AT,AUT): Deutsch-Österreich: EUR/EUR/€
de_CH: German(de,deu)-Switzerland(CH,CHE): Deutsch-Schweiz: CHF/CHF/SFr.
de_DE: German(de,deu)-Germany(DE,DEU): Deutsch-Deutschland: EUR/EUR/€
de_LU: German(de,deu)-Luxembourg(LU,LUX): Deutsch-Luxemburg: EUR/EUR/€
el: Greek(el,ell): Ελληνικά
el_CY: Greek(el,ell)-Cyprus(CY,CYP): Ελληνικά-Κύπρος: CYP/CYP/£
el_GR: Greek(el,ell)-Greece(GR,GRC): Ελληνικά-Ελλάδα: EUR/EUR/€
en: English(en,eng): English
en_AU: English(en,eng)-Australia(AU,AUS): English-Australia: AUD/AUD/$
en_CA: English(en,eng)-Canada(CA,CAN): English-Canada: CAD/CAD/$
en_GB: English(en,eng)-United Kingdom(GB,GBR): English-United Kingdom: GBP/GBP/£
en_IE: English(en,eng)-Ireland(IE,IRL): English-Ireland: EUR/EUR/€
en_IN: English(en,eng)-India(IN,IND): English-India: INR/INR/Rs.
en_MT: English(en,eng)-Malta(MT,MLT): English-Malta: MTL/MTL/Lm
en_NZ: English(en,eng)-New Zealand(NZ,NZL): English-New Zealand: NZD/NZD/$
en_PH: English(en,eng)-Philippines(PH,PHL): English-Philippines: PHP/PHP/Php
en_SG: English(en,eng)-Singapore(SG,SGP): English-Singapore: SGD/SGD/$
en_US: English(en,eng)-United States(US,USA): English-United States: USD/$/$
en_ZA: English(en,eng)-South Africa(ZA,ZAF): English-South Africa: ZAR/ZAR/R
es: Spanish(es,spa): español
es_AR: Spanish(es,spa)-Argentina(AR,ARG): español-Argentina: ARS/ARS/$
es_BO: Spanish(es,spa)-Bolivia(BO,BOL): español-Bolivia: BOB/BOB/B$
es_CL: Spanish(es,spa)-Chile(CL,CHL): español-Chile: CLP/CLP/Ch$
es_CO: Spanish(es,spa)-Colombia(CO,COL): español-Colombia: COP/COP/$
es_CR: Spanish(es,spa)-Costa Rica(CR,CRI): español-Costa Rica: CRC/CRC/C
es_DO: Spanish(es,spa)-Dominican Republic(DO,DOM): español-República Dominicana: DOP/DOP/RD$
es_EC: Spanish(es,spa)-Ecuador(EC,ECU): español-Ecuador: USD/$/$
es_ES: Spanish(es,spa)-Spain(ES,ESP): español-España: EUR/EUR/€
es_GT: Spanish(es,spa)-Guatemala(GT,GTM): español-Guatemala: GTQ/GTQ/Q
es_HN: Spanish(es,spa)-Honduras(HN,HND): español-Honduras: HNL/HNL/L
es_MX: Spanish(es,spa)-Mexico(MX,MEX): español-México: MXN/MXN/$
es_NI: Spanish(es,spa)-Nicaragua(NI,NIC): español-Nicaragua: NIO/NIO/$C
es_PA: Spanish(es,spa)-Panama(PA,PAN): español-Panamá: PAB/PAB/B
es_PE: Spanish(es,spa)-Peru(PE,PER): español-Perú: PEN/PEN/S/
es_PR: Spanish(es,spa)-Puerto Rico(PR,PRI): español-Puerto Rico: USD/$/$
es_PY: Spanish(es,spa)-Paraguay(PY,PRY): español-Paraguay: PYG/PYG/G
es_SV: Spanish(es,spa)-El Salvador(SV,SLV): español-El Salvador: SVC/SVC/C
es_US: Spanish(es,spa)-United States(US,USA): español-Estados Unidos: USD/$/US$
es_UY: Spanish(es,spa)-Uruguay(UY,URY): español-Uruguay: UYU/UYU/NU$
es_VE: Spanish(es,spa)-Venezuela(VE,VEN): español-Venezuela: VEF/VEF/BsF.
et: Estonian(et,est): Eesti
et_EE: Estonian(et,est)-Estonia(EE,EST): Eesti-Eesti: EEK/EEK/kr
fi: Finnish(fi,fin): suomi
fi_FI: Finnish(fi,fin)-Finland(FI,FIN): suomi-Suomi: EUR/EUR/€
fr: French(fr,fra): français
fr_BE: French(fr,fra)-Belgium(BE,BEL): français-Belgique: EUR/EUR/€
fr_CA: French(fr,fra)-Canada(CA,CAN): français-Canada: CAD/CAD/$
fr_CH: French(fr,fra)-Switzerland(CH,CHE): français-Suisse: CHF/CHF/SFr.
fr_FR: French(fr,fra)-France(FR,FRA): français-France: EUR/EUR/€
fr_LU: French(fr,fra)-Luxembourg(LU,LUX): français-Luxembourg: EUR/EUR/€
ga: Irish(ga,gle): Gaeilge
ga_IE: Irish(ga,gle)-Ireland(IE,IRL): Gaeilge-Éire: EUR/EUR/€
hi_IN: Hindi(hi,hin)-India(IN,IND): हिंदी-भारत: INR/INR/रू
hr: Croatian(hr,hrv): hrvatski
hr_HR: Croatian(hr,hrv)-Croatia(HR,HRV): hrvatski-Hrvatska: HRK/HRK/Kn
hu: Hungarian(hu,hun): magyar
hu_HU: Hungarian(hu,hun)-Hungary(HU,HUN): magyar-Magyarország: HUF/HUF/Ft
in: Indonesian(in,ind): Bahasa Indonesia
in_ID: Indonesian(in,ind)-Indonesia(ID,IDN): Bahasa Indonesia-Indonesia: IDR/IDR/Rp
is: Icelandic(is,isl): íslenska
is_IS: Icelandic(is,isl)-Iceland(IS,ISL): íslenska-Ísland: ISK/ISK/kr.
it: Italian(it,ita): italiano
it_CH: Italian(it,ita)-Switzerland(CH,CHE): italiano-Svizzera: CHF/CHF/SFr.
it_IT: Italian(it,ita)-Italy(IT,ITA): italiano-Italia: EUR/EUR/€
iw: Hebrew(iw,heb): עברית
iw_IL: Hebrew(iw,heb)-Israel(IL,ISR): עברית-ישראל: ILS/ILS/ש"ח
ja: Japanese(ja,jpn): 日本語
ja_JP: Japanese(ja,jpn)-Japan(JP,JPN): 日本語-日本: JPY/JPY/¥
ja_JP_JP: Japanese(ja,jpn)-Japan(JP,JPN): 日本語-日本: JPY/JPY/¥
ko: Korean(ko,kor): 한국어
ko_KR: Korean(ko,kor)-South Korea(KR,KOR): 한국어-대한민국: KRW/KRW/₩
lt: Lithuanian(lt,lit): Lietuvių
lt_LT: Lithuanian(lt,lit)-Lithuania(LT,LTU): Lietuvių-Lietuva: LTL/LTL/Lt
lv: Latvian(lv,lav): Latviešu
lv_LV: Latvian(lv,lav)-Latvia(LV,LVA): Latviešu-Latvija: LVL/LVL/Ls
mk: Macedonian(mk,mkd): македонски
mk_MK: Macedonian(mk,mkd)-Macedonia(MK,MKD): македонски-Македонија: MKD/MKD/Den
ms: Malay(ms,msa): Bahasa Melayu
ms_MY: Malay(ms,msa)-Malaysia(MY,MYS): Bahasa Melayu-Malaysia: MYR/MYR/RM
mt: Maltese(mt,mlt): Malti
mt_MT: Maltese(mt,mlt)-Malta(MT,MLT): Malti-Malta: MTL/MTL/Lm
nl: Dutch(nl,nld): Nederlands
nl_BE: Dutch(nl,nld)-Belgium(BE,BEL): Nederlands-België: EUR/EUR/€
nl_NL: Dutch(nl,nld)-Netherlands(NL,NLD): Nederlands-Nederland: EUR/EUR/€
no: Norwegian(no,nor): norsk
no_NO: Norwegian(no,nor)-Norway(NO,NOR): norsk-Norge: NOK/NOK/kr
no_NO_NY: Norwegian(no,nor)-Norway(NO,NOR): norsk-Norge: NOK/NOK/kr
pl: Polish(pl,pol): polski
pl_PL: Polish(pl,pol)-Poland(PL,POL): polski-Polska: PLN/PLN/zł
pt: Portuguese(pt,por): português
pt_BR: Portuguese(pt,por)-Brazil(BR,BRA): português-Brasil: BRL/BRL/R$
pt_PT: Portuguese(pt,por)-Portugal(PT,PRT): português-Portugal: EUR/EUR/€
ro: Romanian(ro,ron): română
ro_RO: Romanian(ro,ron)-Romania(RO,ROU): română-România: RON/RON/LEI
ru: Russian(ru,rus): русский
ru_RU: Russian(ru,rus)-Russia(RU,RUS): русский-Россия: RUB/RUB/руб.
sk: Slovak(sk,slk): Slovenčina
sk_SK: Slovak(sk,slk)-Slovakia(SK,SVK): Slovenčina-Slovenská republika: SKK/SKK/Sk
sl: Slovenian(sl,slv): Slovenščina
sl_SI: Slovenian(sl,slv)-Slovenia(SI,SVN): Slovenščina-Slovenija: EUR/EUR/€
sq: Albanian(sq,sqi): shqipe
sq_AL: Albanian(sq,sqi)-Albania(AL,ALB): shqipe-Shqipëria: ALL/ALL/Lek
sr: Serbian(sr,srp): Српски
sr_BA: Serbian(sr,srp)-Bosnia and Herzegovina(BA,BIH): Српски-Босна и Херцеговина: BAM/BAM/КМ.
sr_CS: Serbian(sr,srp)-Serbia and Montenegro(CS,SCG): Српски-Србија и Црна Гора: CSD/CSD/CSD
sr_ME: Serbian(sr,srp)-Montenegro(ME,MNE): Српски-Montenegro: EUR/EUR/€
sr_RS: Serbian(sr,srp)-Serbia(RS,SRB): Српски-Serbia: RSD/RSD/RSD
sv: Swedish(sv,swe): svenska
sv_SE: Swedish(sv,swe)-Sweden(SE,SWE): svenska-Sverige: SEK/SEK/kr
th: Thai(th,tha): ไทย
th_TH: Thai(th,tha)-Thailand(TH,THA): ไทย-ประเทศไทย: THB/THB/฿
th_TH_TH: Thai(th,tha)-Thailand(TH,THA): ไทย-ประเทศไทย: THB/THB/฿
tr: Turkish(tr,tur): Türkçe
tr_TR: Turkish(tr,tur)-Turkey(TR,TUR): Türkçe-Türkiye: TRY/TRY/YTL
uk: Ukrainian(uk,ukr): українська
uk_UA: Ukrainian(uk,ukr)-Ukraine(UA,UKR): українська-Україна: UAH/UAH/грв.
vi: Vietnamese(vi,vie): Tiếng Việt
vi_VN: Vietnamese(vi,vie)-Vietnam(VN,VNM): Tiếng Việt-Việt Nam: VND/VND/đ
zh: Chinese(zh,zho): 中文
zh_CN: Chinese(zh,zho)-China(CN,CHN): 中文-中国: CNY/CNY/¥
zh_HK: Chinese(zh,zho)-Hong Kong(HK,HKG): 中文-香港: HKD/HKD/HK$
zh_SG: Chinese(zh,zho)-Singapore(SG,SGP): 中文-新加坡: SGD/SGD/S$
zh_TW: Chinese(zh,zho)-Taiwan(TW,TWN): 中文-台灣: TWD/TWD/NT$
--
John W. Kennedy
"Information is light. Information, in itself, about anything, is light."
-- Tom Stoppard. "Night and Day"
------------------------------
Date: Thu, 18 Sep 2008 06:43:13 +0200
From: "Petr Vileta \(fidokomik\)" <stoupa@practisoft.cz>
Subject: Re: language - plea for help
Message-Id: <gasme4$1fpu$1@adenine.netfront.net>
John W Kennedy wrote:
>> OK, I must re-formulate my plea ;-)
>> Can anybody help me to create table for most used languages and all
>> its locale codes?
>>
>> Langugage All possible locales
>> ----------------------------------------------
>> Czech cs, cz
> Unfortunately, I cannot give you those, but here's a list from MacOS:
>
> ar: Arabic(ar,ara): العربية
> ar_AE: Arabic(ar,ara)-United Arab Emirates(AE,ARE): العربية-الإمارات:
[...]
> zh: Chinese(zh,zho): 中文
> zh_CN: Chinese(zh,zho)-China(CN,CHN): 中文-中国: CNY/CNY/¥
> zh_HK: Chinese(zh,zho)-Hong Kong(HK,HKG): 中文-香港: HKD/HKD/HK$
> zh_SG: Chinese(zh,zho)-Singapore(SG,SGP): 中文-新加坡: SGD/SGD/S$
> zh_TW: Chinese(zh,zho)-Taiwan(TW,TWN): 中文-台灣: TWD/TWD/NT$
Many thanks.
Can anybody other send me some similar from Linux or Windows
--
Petr Vileta, Czech republic
(My server rejects all messages from Yahoo and Hotmail.
Send me your mail from another non-spammer site please.)
Please reply to <petr AT practisoft DOT cz>
-- Posted on news://freenews.netfront.net - Complaints to news@netfront.net --
------------------------------
Date: Thu, 18 Sep 2008 06:56:25 +0200
From: Peter Makholm <peter@makholm.net>
Subject: Re: language - plea for help
Message-Id: <87bpym59xi.fsf@hacking.dk>
"Petr Vileta \(fidokomik\)" <stoupa@practisoft.cz> writes:
> Can anybody help me to create table for most used languages and all
> its locale codes?
ISO 639-1 might be the standard you're looking for, possibly together
with ISO 3166-1 for variants used in speific nations (ie. en_US is
english as used in US).
Wikipedia seems to have both lists.
//Makholm
------------------------------
Date: Thu, 18 Sep 2008 04:42:21 GMT
From: merlyn@stonehenge.com (Randal Schwartz)
Subject: new CPAN modules on Thu Sep 18 2008
Message-Id: <K7DJqL.9Mv@zorch.sf-bay.org>
The following modules have recently been added to or updated in the
Comprehensive Perl Archive Network (CPAN). You can install them using the
instructions in the 'perlmodinstall' page included with your Perl
distribution.
Acme-CPANAuthors-French-0.03
http://search.cpan.org/~saper/Acme-CPANAuthors-French-0.03/
We are French CPAN authors
----
Acme-MetaSyntactic-daleks-1.04
http://search.cpan.org/~saper/Acme-MetaSyntactic-daleks-1.04/
EXTERMINATE! EXTERMINATE! EXTERMINATE!
----
Acme-MetaSyntactic-daleks-1.05
http://search.cpan.org/~saper/Acme-MetaSyntactic-daleks-1.05/
EXTERMINATE! EXTERMINATE! EXTERMINATE!
----
App-CPAN-Testers-Remailer-0.01
http://search.cpan.org/~dagolden/App-CPAN-Testers-Remailer-0.01/
monitor CPAN Testers and remail reports to an author
----
CGI-Carp-Throw-0.04
http://search.cpan.org/~ronaldws/CGI-Carp-Throw-0.04/
CGI::Carp exceptions that don't look like errors.
----
Carp-POE-0.06_01
http://search.cpan.org/~hinrik/Carp-POE-0.06_01/
Carp adapted to POE
----
Catalyst-Authentication-Store-DBIx-Class-0.105
http://search.cpan.org/~jayk/Catalyst-Authentication-Store-DBIx-Class-0.105/
A storage class for Catalyst Authentication using DBIx::Class
----
Catalyst-Authentication-Store-DBIx-Class-0.106
http://search.cpan.org/~jayk/Catalyst-Authentication-Store-DBIx-Class-0.106/
A storage class for Catalyst Authentication using DBIx::Class
----
Catalyst-Authentication-Store-Tangram-0.001
http://search.cpan.org/~bobtfish/Catalyst-Authentication-Store-Tangram-0.001/
A storage class for Catalyst authentication from a class stored in Tangram
----
CatalystX-CRUD-YUI-0.005
http://search.cpan.org/~karman/CatalystX-CRUD-YUI-0.005/
YUI for your CatalystX::CRUD view
----
Config-Find-0.23
http://search.cpan.org/~salva/Config-Find-0.23/
Find configuration files in the native OS fashion
----
Data-InputMonster-0.004
http://search.cpan.org/~rjbs/Data-InputMonster-0.004/
consume data from multiple sources, best first; om nom nom!
----
Data-ParseBinary-0.06
http://search.cpan.org/~semuelf/Data-ParseBinary-0.06/
Yet Another parser for binary structures
----
File-Magic-0.01
http://search.cpan.org/~rehsack/File-Magic-0.01/
Perl extension for embedding file(1)'s libmagic
----
Flickr-Upload-1.32
http://search.cpan.org/~cpb/Flickr-Upload-1.32/
Upload images to flickr.com
----
Games-Risk-0.6.2
http://search.cpan.org/~jquelin/Games-Risk-0.6.2/
classical 'risk' board game
----
Kephra-0.3.10.10
http://search.cpan.org/~lichtkind/Kephra-0.3.10.10/
crossplatform, GUI-Texteditor along perllike Paradigms
----
Math-Random-0.71
http://search.cpan.org/~grommel/Math-Random-0.71/
Random Number Generators
----
Module-Extract-Namespaces-0.13
http://search.cpan.org/~bdfoy/Module-Extract-Namespaces-0.13/
extract the package declarations from a module
----
Module-Extract-VERSION-0.12
http://search.cpan.org/~bdfoy/Module-Extract-VERSION-0.12/
Extract a module version without running code
----
PAR-Dist-0.33
http://search.cpan.org/~smueller/PAR-Dist-0.33/
Create and manipulate PAR distributions
----
PHP-Serialization-0.29
http://search.cpan.org/~bobtfish/PHP-Serialization-0.29/
simple flexible means of converting the output of PHP's serialize() into the equivalent Perl memory structure, and vice versa.
----
POE-Component-Log4perl-0.02
http://search.cpan.org/~kesteb/POE-Component-Log4perl-0.02/
Perl extension for the POE Environemt
----
POE-Component-SmokeBox-Dists-0.04
http://search.cpan.org/~bingos/POE-Component-SmokeBox-Dists-0.04/
Search for CPAN distributions by cpanid or distribution name
----
Padre-0.09
http://search.cpan.org/~szabgab/Padre-0.09/
Perl Application Development and Refactoring Environment
----
Parse-CPAN-Distributions-0.04
http://search.cpan.org/~barbie/Parse-CPAN-Distributions-0.04/
Provides an index for current CPAN distributions
----
QWizard-3.15
http://search.cpan.org/~hardaker/QWizard-3.15/
Display a series of questions, get the answers, and act on the answers.
----
RT-Extension-SearchResults-XLS-0.04
http://search.cpan.org/~elacour/RT-Extension-SearchResults-XLS-0.04/
Add Excel format export to RT search results
----
Rose-DB-Object-0.7713
http://search.cpan.org/~jsiracusa/Rose-DB-Object-0.7713/
Extensible, high performance object-relational mapper (ORM).
----
Rose-DBx-Object-Renderer-0.33
http://search.cpan.org/~danny/Rose-DBx-Object-Renderer-0.33/
Web UI Rendering for Rose::DB::Object
----
Set-IntSpan-Island-0.04
http://search.cpan.org/~martink/Set-IntSpan-Island-0.04/
extension for Set::IntSpan to handle islands, holes and covers
----
Test-DBUnit-0.12
http://search.cpan.org/~adrianwit/Test-DBUnit-0.12/
Database test framework.
----
Text-ParseWords-3.25_01
http://search.cpan.org/~chorny/Text-ParseWords-3.25_01/
parse text into an array of tokens or array of arrays
----
Tie-Array-AsHash-0.09
http://search.cpan.org/~rehsack/Tie-Array-AsHash-0.09/
Like Tie::File::AsHash (now: groundwork for it) but allows any array being source, not just files.
----
Tie-File-AsHash-0.09
http://search.cpan.org/~rehsack/Tie-File-AsHash-0.09/
Like Tie::File but access lines using a hash instead of an array
----
Tk-EntrySet-0.06
http://search.cpan.org/~lamprecht/Tk-EntrySet-0.06/
display/edit a list of values in a Set of Widgets.
----
Tk-Wizard-2.139
http://search.cpan.org/~lgoddard/Tk-Wizard-2.139/
GUI for step-by-step interactive logical process
----
XML-Easy-ProceduralWriter-1.00
http://search.cpan.org/~markf/XML-Easy-ProceduralWriter-1.00/
even easier writing of XML
----
YUM-RepoQuery-0.0.3
http://search.cpan.org/~rsrchboy/YUM-RepoQuery-0.0.3/
Query a YUM repository for package information
----
file-tabulardata-0.02
http://search.cpan.org/~xerxes/file-tabulardata-0.02/
----
parrot-0.7.1
http://search.cpan.org/~pmic/parrot-0.7.1/
----
zxid-0.27
http://search.cpan.org/~sampo/zxid-0.27/
If you're an author of one of these modules, please submit a detailed
announcement to comp.lang.perl.announce, and we'll pass it along.
This message was generated by a Perl program described in my Linux
Magazine column, which can be found on-line (along with more than
200 other freely available past column articles) at
http://www.stonehenge.com/merlyn/LinuxMag/col82.html
print "Just another Perl hacker," # the original
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc.
See http://methodsandmessages.vox.com/ for Smalltalk and Seaside discussion
------------------------------
Date: Thu, 18 Sep 2008 01:49:31 +0100
From: Ben Morrow <ben@morrow.me.uk>
Subject: Re: pack and byte length.
Message-Id: <r5l8q5-co01.ln1@osiris.mauzo.dyndns.org>
Quoth Fabrice <fabrice.gautier@gmail.com>:
>
> Whats the proper way to figure out the length , in bytes, of the
> result of a pack command ?
>
> That is: I use the pack command then write the result in a file, I
> want to know the actual number of bytes written ?
Err, perldoc -f length? If that isn't what you want, you will need to
post your code.
Ben
--
Many users now operate their own computers day in and day out on various
applications without ever writing a program. Indeed, many of these users
cannot write new programs for their machines...
-- F.P. Brooks, 'No Silver Bullet', 1987 [ben@morrow.me.uk]
------------------------------
Date: Wed, 17 Sep 2008 18:41:53 -0700 (PDT)
From: Fabrice <fabrice.gautier@gmail.com>
Subject: Re: pack and byte length.
Message-Id: <0ec1de65-cd0b-4cda-9705-67cdee8eddc8@a3g2000prm.googlegroups.com>
On Sep 17, 5:49=A0pm, Ben Morrow <b...@morrow.me.uk> wrote:
> Quoth Fabrice <fabrice.gaut...@gmail.com>:
>
>
>
> > Whats the proper way to figure out the length , in bytes, of the
> > result of a pack command ?
>
> > That is: I use the pack command then write the result in a file, I
> > want to know the actual number of bytes written ?
>
> Err, perldoc -f length? If that isn't what you want, you will need to
> post your code.
>
> Ben
I did read the length doc, and its not that clear.
By default length return the character length not the byte length. The
doc mention bytes::length but also says: "Note that the internal
encoding is variable, and the number of bytes usually meaningless."
It is not clear if the internal encoding and the result of "print" to
a file will yield the same number of bytes in all cases (eg: windows
vs unix platform, binary vs text mode files etc...)
So yes, length (or rather bytes::length) works, but I'm wondering if
this is the "proper way".
------------------------------
Date: Thu, 18 Sep 2008 04:37:06 +0100
From: Ben Morrow <ben@morrow.me.uk>
Subject: Re: pack and byte length.
Message-Id: <20v8q5-q261.ln1@osiris.mauzo.dyndns.org>
Quoth Fabrice <fabrice.gautier@gmail.com>:
> On Sep 17, 5:49pm, Ben Morrow <b...@morrow.me.uk> wrote:
> > Quoth Fabrice <fabrice.gaut...@gmail.com>:
> >
> > > Whats the proper way to figure out the length , in bytes, of the
> > > result of a pack command ?
> >
> > > That is: I use the pack command then write the result in a file, I
> > > want to know the actual number of bytes written ?
> >
> > Err, perldoc -f length? If that isn't what you want, you will need to
> > post your code.
>
> I did read the length doc, and its not that clear.
>
> By default length return the character length not the byte length. The
> doc mention bytes::length but also says: "Note that the internal
> encoding is variable, and the number of bytes usually meaningless."
Ah, I see, and I appreciate your confusion: Perl's behaviour in this
area is complicated, and not necessarily easy to understand.
pack always returns a byte string, not a character string; that is,
length and bytes::length will always give the same result, and this will
be the actual number of bytes printed.
> It is not clear if the internal encoding and the result of "print" to
> a file will yield the same number of bytes in all cases (eg: windows
> vs unix platform, binary vs text mode files etc...)
If you are writing binary data to a file you must make sure to call
binmode on the filehandle (or open it with the :raw layer). If you have
then the same number of bytes will be printed in every case; if you try
to print a character string with characters that don't fit into a byte,
you will get a 'Wide character in print' warning. pack will never return
such a string unless you use the 'U' template.
> So yes, length (or rather bytes::length) works, but I'm wondering if
> this is the "proper way".
Yes, it is.
Ben
--
I must not fear. Fear is the mind-killer. I will face my fear and
I will let it pass through me. When the fear is gone there will be
nothing. Only I will remain.
ben@morrow.me.uk Frank Herbert, 'Dune'
------------------------------
Date: Wed, 17 Sep 2008 22:46:20 -0700 (PDT)
From: kath <nitte.sudhir@gmail.com>
Subject: Re: Segmentation fault: problem with perl threads
Message-Id: <6cfb7b68-bb01-41d7-818b-b857ba2e0939@s9g2000prg.googlegroups.com>
Hello Xho,
I would like to get help.
> They can't give the problem, not by themselves. The sub has to be called
> by something. And _replicate has to be passed some complex structure that
> I don't know how to create. I could guess about it's internal structure
> based on how your code uses it, but I'm reluctant to do that. It is better
> if you post a *complete* program that we can run and see the problem,
> without having to reverse engineer the driving code and the data structures
> (and the "use" statement).
_replicate() is passed with a datastructure and it looks like this,
$VAR1 = [
{
'sc_name' => 'XYZ_Scenario',
'rsync' => [
{
'elements' => [
'rsync --archive --relative
--stats --verbose --links --copy-links --copy-unsafe-links --safe-
links --times --files-from=\'./Sep_17_2008(22h.50m.52s)/gen/file-from/
XYZ_Scenario/rsync_input-1.txt\' ',
'rsync://xxx.yyy.zzz.corp:
1873/',
'contexts',
' /var/workshare/contexts
>> \'./Sep_17_2008(22h.50m.52s)/log/XYZ_Scenario/rsync_input-1.log\'
2>&1'
],
'statistics' => {
'total_files' => 863,
'size' => 232563375
},
'status' => undef # here i write something
meaningful for db updation later.
},
...
...
]# this array will have 10 or less, such objects with diff.
'rsync_input-*.txt' files to replicate
'total_size' => 2184209735,
'total_dep' => 13725
},
...
...
]# varies, based on scenarios
I checked this datastructure carefully, it looks like what i intended,
so no problem till here
> >...
> I don't have a version of 5.8.3 handy, so I couldn't test your code under
> it anyway. All the more reason to make complete, runnable scripts. The
> easier you make it on us, the more people will be inclined to help, maybe
> one with a copy of 5.8.3 hanging around.
Firstly, thanks so much.
Below is the same set of functions im posting as earlier. Because i
think the problem is lies here. I tried running my script on perl5.8.8
and still i get 'Segementation fault' even if i actually execute the
rsync command in thread or just print rsync command in thread and
return.
I strongly believe, i might be calling join() method on thread object
which might have died after finishing its job. Hence i try to
dereference a reference which is deallocated(may be or ..?).
This happens because, when 10 threads are running parallely and i wait
for a 2nd thread, suppose, to join. Meanwhile 3rd or 4th or
8th(anything till 10) might have finished running. Once 2nd joins and
main thread tries to call join() on next thread object, in the
array(either returned by threads->list or i keep thread object in a
array), which no more exists, or no clue whether the thread is
joinnable.
I tried to make sure whether thread is running as you can see in below
code, _replicate(),
sub _replicate{
my $ref = shift;
my $logger = get_logger();
print "Starting replication of dependency files", $/;
$logger->info("Starting replication of dependency files");
foreach my $sc(@{$ref}){
next unless (defined $sc);
mkdir($LOG_FOLDER."/".$sc->{sc_name});
$logger->info("\tScenario: ".$sc->{sc_name});
$logger->info("\tLatest Dependencies: ".$sc->{total_dep}." of size
"._get_readable_size($sc->{total_size}));
my @thr_arr = ();
foreach my $robj(@{$sc->{rsync}}){
# I will add a key to this datastructure, to check whether thread
is joinnable or it is still running?
$robj->{thr} => 'running';
my $th = threads->create(\&worker, $robj);
$logger->info("\tThread-".$th->tid.", Total files: ".$robj-
>{statistics}->{total_files}.", Size: "._get_readable_size($robj-
>{statistics}->{size})."[".$robj->{statistics}->{size}."B]");
$logger->info("\tcmd: ".join("", @{$robj->{elements}}));
push @thr_arr, $th->tid;
}
$logger->info("\twaiting for threads to finish its job...");
# 3rd try
foreach my $k(0..$#thr_arr){
# lets check tid and then access the thread object!
print $k," ",$sc->{rsync}->[$k]->{thr}, $/;
if ($sc->{rsync}->[$k]->{thr} eq 'running'){# if not, thread might
have died and we try to acces the mem. which is deallocated after
thread's death
my $t = $thr_arr[$k];
my $th = threads->object($t);
$th->join() if ($th);
}
}
# 2nd try
# map{
# my $th = $_;
# just a blind belief whether this might cause 'Segmentation
fault', hence the check. But here may, the thread object im referring
might have been deallocated due to death of thread, hence i get
'Segmentation fault' .... ?
# my $k = $th->join if($th);
# }@thr_arr;
# 1st try
# May be the thread objects returned by threads->list are unjoined,
but are they joinnable? no clue...!
#map {my $k = $_->join} threads->list;
$logger->info("\tFinished replicating dependencies of ".$sc-
>{sc_name});
}
}
sub worker{
my $robj = shift;
my ($rsync, $server, $from, $to) = @{$robj->{elements}};
my $alt_server = $RSYNC_CONN_STR_2;
print "Thread-".threads->self->tid." running";
my $i = 0;
while(++$i <= $MAX_REPL_ATTEMPT){
#$logger->info("\t\t[Attempt-".$i."]Thread-".threads->self->tid."
executing [".$rsync_cmd."]");
#$logger->info("\t\t\tTotal files: ".$robj->{statistics}-
>{total_files}.", Size: "._get_readable_size($robj->{statistics}-
>{size})."[".$robj->{statistics}->{size}."B]");
my $rsync_cmd = $rsync.$server.$from.$to;
`$rsync_cmd`;
if ($?){ # because of connection refusal from server, command fails
$robj->{status} = "Completed with error!";
$rsync_cmd = $rsync.$server.$from.$to;
$server = ($i%2) ? $RSYNC_CONN_STR_1 : $RSYNC_CONN_STR_2; # just a
small trick to use other port on the same server for connection
#$logger->error("ERROR: Thread-".threads->self->tid." says,
replication Attempt-".$i." failed, trying again after 2 mins.");
sleep(120);
}else{
$robj->{status} = "Completed";
last;
}
}
$robj->{thr} = 'done';
my $etime = time;
my $spent_time = $etime - $stime;
my $logger = get_logger();
$logger->info("\t\t[Attempt-".$i."]Thread-".threads->self->tid." took
"._format_spent_time($spent_time)." time");
}
I would ask, is there anyway i would make sure all threads are
finished or call join on only those threads which are joinnable or i
have to go with other solution which sent earlier, fork() ing
processes, instead thread?
Thanks in advance,
katharnakh.
------------------------------
Date: 6 Apr 2001 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 6 Apr 01)
Message-Id: <null>
Administrivia:
#The Perl-Users Digest is a retransmission of the USENET newsgroup
#comp.lang.perl.misc. For subscription or unsubscription requests, send
#the single line:
#
# subscribe perl-users
#or:
# unsubscribe perl-users
#
#to almanac@ruby.oce.orst.edu.
NOTE: due to the current flood of worm email banging on ruby, the smtp
server on ruby has been shut off until further notice.
To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.
#To request back copies (available for a week or so), send your request
#to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
#where x is the volume number and y is the issue number.
#For other requests pertaining to the digest, send mail to
#perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
#sending perl questions to the -request address, I don't have time to
#answer them even if I did know the answer.
------------------------------
End of Perl-Users Digest V11 Issue 1861
***************************************