Debian Codegraph @

po/ar/man1/perlref.1.po

raw
1 # Arabic translation of manpages
2 # This file is distributed under the same license as the manpages-l10n package.
3 # Copyright © of this file:
4 # زايد السعيدي <[email protected]>, 2026.
5 msgid ""
6 msgstr ""
7 "Project-Id-Version: manpages-l10n\n"
8 "POT-Creation-Date: 2026-06-05 06:34+0200\n"
9 "PO-Revision-Date: 2026-06-03 04:49+0400\n"
10 "Last-Translator: Zayed Al-Saidi <[email protected]>\n"
11 "Language-Team: Arabic <[email protected]>\n"
12 "Language: ar\n"
13 "MIME-Version: 1.0\n"
14 "Content-Type: text/plain; charset=UTF-8\n"
15 "Content-Transfer-Encoding: 8bit\n"
16 ".MIME-Version: 1.0\n"
17 "Plural-Forms: nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 "
18 "&& n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;\n"
19 "X-Generator: Lokalize 23.08.5\n"
20
21 # #-#-#-#-# fedora-44: perlref.1.pot (PACKAGE VERSION) #-#-#-#-#
22 #
23 # #-#-#-#-# fedora-rawhide: perlref.1.pot (PACKAGE VERSION) #-#-#-#-#
24 #
25 # #-#-#-#-# mageia-cauldron: perlref.1.pot (PACKAGE VERSION) #-#-#-#-#
26 #
27 # #-#-#-#-# opensuse-leap-16-1: perlref.1.pot (PACKAGE VERSION) #-#-#-#-#
28 #
29 # #-#-#-#-# opensuse-tumbleweed: perlref.1.pot (PACKAGE VERSION) #-#-#-#-#
30 #
31 #. #-#-#-#-# debian-trixie: perlref.1.pot (PACKAGE VERSION) #-#-#-#-#
32 #. ========================================================================
33 #. type: IX
34 #. #-#-#-#-# debian-unstable: perlref.1.pot (PACKAGE VERSION) #-#-#-#-#
35 #. ========================================================================
36 #. type: IX
37 #. #-#-#-#-# fedora-44: perlref.1.pot (PACKAGE VERSION) #-#-#-#-#
38 #. Required to disable full justification in groff 1.23.0.
39 #. ========================================================================
40 #. type: IX
41 #. #-#-#-#-# fedora-rawhide: perlref.1.pot (PACKAGE VERSION) #-#-#-#-#
42 #. Required to disable full justification in groff 1.23.0.
43 #. ========================================================================
44 #. type: IX
45 #. #-#-#-#-# mageia-cauldron: perlref.1.pot (PACKAGE VERSION) #-#-#-#-#
46 #. Required to disable full justification in groff 1.23.0.
47 #. ========================================================================
48 #. type: IX
49 #. #-#-#-#-# opensuse-leap-16-1: perlref.1.pot (PACKAGE VERSION) #-#-#-#-#
50 #. Required to disable full justification in groff 1.23.0.
51 #. ========================================================================
52 #. type: IX
53 #. #-#-#-#-# opensuse-tumbleweed: perlref.1.pot (PACKAGE VERSION) #-#-#-#-#
54 #. Required to disable full justification in groff 1.23.0.
55 #. ========================================================================
56 #. type: IX
57 #: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron
58 #: opensuse-leap-16-1 opensuse-tumbleweed
59 #, no-wrap
60 msgid "Title"
61 msgstr "Title"
62
63 # #-#-#-#-# fedora-44: perlref.1.pot (PACKAGE VERSION) #-#-#-#-#
64 #
65 # #-#-#-#-# fedora-rawhide: perlref.1.pot (PACKAGE VERSION) #-#-#-#-#
66 #
67 # #-#-#-#-# mageia-cauldron: perlref.1.pot (PACKAGE VERSION) #-#-#-#-#
68 #
69 # #-#-#-#-# opensuse-leap-16-1: perlref.1.pot (PACKAGE VERSION) #-#-#-#-#
70 #
71 # #-#-#-#-# opensuse-tumbleweed: perlref.1.pot (PACKAGE VERSION) #-#-#-#-#
72 #
73 #. #-#-#-#-# debian-trixie: perlref.1.pot (PACKAGE VERSION) #-#-#-#-#
74 #. ========================================================================
75 #. type: IX
76 #. #-#-#-#-# debian-unstable: perlref.1.pot (PACKAGE VERSION) #-#-#-#-#
77 #. ========================================================================
78 #. type: IX
79 #. #-#-#-#-# fedora-44: perlref.1.pot (PACKAGE VERSION) #-#-#-#-#
80 #. Required to disable full justification in groff 1.23.0.
81 #. ========================================================================
82 #. type: IX
83 #. #-#-#-#-# fedora-rawhide: perlref.1.pot (PACKAGE VERSION) #-#-#-#-#
84 #. Required to disable full justification in groff 1.23.0.
85 #. ========================================================================
86 #. type: IX
87 #. #-#-#-#-# mageia-cauldron: perlref.1.pot (PACKAGE VERSION) #-#-#-#-#
88 #. Required to disable full justification in groff 1.23.0.
89 #. ========================================================================
90 #. type: IX
91 #. #-#-#-#-# opensuse-leap-16-1: perlref.1.pot (PACKAGE VERSION) #-#-#-#-#
92 #. Required to disable full justification in groff 1.23.0.
93 #. ========================================================================
94 #. type: IX
95 #. #-#-#-#-# opensuse-tumbleweed: perlref.1.pot (PACKAGE VERSION) #-#-#-#-#
96 #. Required to disable full justification in groff 1.23.0.
97 #. ========================================================================
98 #. type: IX
99 #: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron
100 #: opensuse-leap-16-1 opensuse-tumbleweed
101 #, no-wrap
102 msgid "PERLREF 1"
103 msgstr "PERLREF 1"
104
105 #. type: TH
106 #: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron
107 #: opensuse-leap-16-1 opensuse-tumbleweed
108 #, no-wrap
109 msgid "PERLREF"
110 msgstr "PERLREF"
111
112 #. type: TH
113 #: debian-trixie
114 #, no-wrap
115 msgid "2025-07-27"
116 msgstr "27 يوليو 2025"
117
118 #. type: TH
119 #: debian-trixie debian-unstable
120 #, no-wrap
121 msgid "perl v5.40.1"
122 msgstr "بيرل v5.40.1"
123
124 #. type: TH
125 #: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron
126 #: opensuse-leap-16-1 opensuse-tumbleweed
127 #, no-wrap
128 msgid "Perl Programmers Reference Guide"
129 msgstr "دليل مرجع مبرمجي بيرل"
130
131 #. type: SH
132 #: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron
133 #: opensuse-leap-16-1 opensuse-tumbleweed
134 #, no-wrap
135 msgid "NAME"
136 msgstr "الاسم"
137
138 #. type: Plain text
139 #: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron
140 #: opensuse-leap-16-1 opensuse-tumbleweed
141 msgid "perlref - Perl references and nested data structures"
142 msgstr "perlref - مراجع بيرل وهياكل البيانات المتداخلة"
143
144 #. type: IX
145 #: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron
146 #: opensuse-leap-16-1 opensuse-tumbleweed
147 #, no-wrap
148 msgid "Xref"
149 msgstr "Xref"
150
151 #. type: IX
152 #: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron
153 #: opensuse-leap-16-1 opensuse-tumbleweed
154 #, no-wrap
155 msgid "reference pointer data structure structure struct"
156 msgstr "مرجع مؤشر هيكل بيانات بنية struct"
157
158 #. type: IX
159 #: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron
160 #: opensuse-leap-16-1 opensuse-tumbleweed
161 #, no-wrap
162 msgid "NOTE"
163 msgstr "ملاحظة"
164
165 #. type: IX
166 #: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron
167 #: opensuse-leap-16-1 opensuse-tumbleweed
168 #, no-wrap
169 msgid "Header"
170 msgstr "Header"
171
172 #. type: Plain text
173 #: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron
174 #: opensuse-leap-16-1 opensuse-tumbleweed
175 msgid ""
176 "This is complete documentation about all aspects of references. For a "
177 "shorter, tutorial introduction to just the essential features, see "
178 "perlreftut."
179 msgstr ""
180 "هذا توثيق كامل حول كافة جوانب المراجع. للحصول على مقدمة تعليمية أقصر للميزات "
181 "الأساسية فقط، انظر perlreftut."
182
183 #. type: IX
184 #: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron
185 #: opensuse-leap-16-1 opensuse-tumbleweed
186 #, no-wrap
187 msgid "DESCRIPTION"
188 msgstr "الوصف"
189
190 #. type: Plain text
191 #: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron
192 #: opensuse-leap-16-1 opensuse-tumbleweed
193 msgid ""
194 "Before release 5 of Perl it was difficult to represent complex data "
195 "structures, because all references had to be symbolic--and even then it was "
196 "difficult to refer to a variable instead of a symbol table entry. Perl now "
197 "not only makes it easier to use symbolic references to variables, but also "
198 "lets you have \"hard\" references to any piece of data or code. Any scalar "
199 "may hold a hard reference. Because arrays and hashes contain scalars, you "
200 "can now easily build arrays of arrays, arrays of hashes, hashes of arrays, "
201 "arrays of hashes of functions, and so on."
202 msgstr ""
203 "قبل الإصدار 5 من بيرل، كان من الصعب تمثيل هياكل البيانات المعقدة، لأن جميع "
204 "المراجع كان يجب أن تكون رمزية - وحتى حينها كان من الصعب الإشارة إلى متغير "
205 "بدلاً من إدخال في جدول الرموز. الآن لا تكتفي بيرل بجعل استخدام المراجع "
206 "الرمزية للمتغيرات أسهل فحسب، بل تتيح لك أيضًا امتلاك مراجع \"صلبة\" (hard) "
207 "لأي قطعة من البيانات أو الكود. يمكن لأي كمية سلمية (scalar) أن تحمل مرجعًا "
208 "صلبًا. وبما أن المصفوفات والمصفوفات المجزأة (hashes) تحتوي على سلميات، يمكنك "
209 "الآن بسهولة بناء مصفوفات من مصفوفات، ومصفوفات من مجزئات، ومجزئات من مصفوفات، "
210 "ومصفوفات من مجزئات دوال، وما إلى ذلك."
211
212 #. type: Plain text
213 #: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron
214 #: opensuse-leap-16-1 opensuse-tumbleweed
215 msgid ""
216 "Hard references are smart--they keep track of reference counts for you, "
217 "automatically freeing the thing referred to when its reference count goes to "
218 "zero. (Reference counts for values in self-referential or cyclic data "
219 "structures may not go to zero without a little help; see \"Circular "
220 "References\" for a detailed explanation.) If that thing happens to be an "
221 "object, the object is destructed. See perlobj for more about objects. (In "
222 "a sense, everything in Perl is an object, but we usually reserve the word "
223 "for references to objects that have been officially \"blessed\" into a class "
224 "package.)"
225 msgstr ""
226 "المراجع الصلبة ذكية - فهي تتبع أعداد المراجع لك، وتُحرر الشيء المشار إليه "
227 "آليًا عندما يصل عدد مراجعة إلى الصفر. (قد لا تصل أعداد المراجع للقيم في هياكل "
228 "البيانات ذاتية المرجعية أو الدائرية إلى الصفر دون القليل من المساعدة؛ انظر "
229 "\"Circular References\" لشرح مفصل.) إذا صادف أن كان ذلك الشيء كائنًا، فسيُدمر "
230 "الكائن. انظر perlobj لمزيد عن الكائنات. (بمعنى ما، كل شيء في بيرل هو كائن، "
231 "لكننا عادة ما نحتفظ بالكلمة للمراجع إلى الكائنات التي تم \"مباركتها\" رسميًا "
232 "في حزمة فئة.)"
233
234 #. type: Plain text
235 #: debian-trixie debian-unstable
236 msgid ""
237 "Symbolic references are names of variables or other objects, just as a "
238 "symbolic link in a Unix filesystem contains merely the name of a file. The "
239 "CW<*glob> notation is something of a symbolic reference. (Symbolic "
240 "references are sometimes called \"soft references\", but please don't call "
241 "them that; references are confusing enough without useless synonyms.)"
242 msgstr ""
243 "المراجع الرمزية هي أسماء لمتغيرات أو كائنات أخرى، تمامًا كما يحتوي الرابط "
244 "الرمزي في نظام ملفات يونكس على اسم ملف فحسب. تدوين CW<*glob> هو نوع من "
245 "المراجع الرمزية. (تُسمى المراجع الرمزية أحيانًا \"مراجع ناعمة\"، ولكن يرجى عدم "
246 "تسميتها بذلك؛ فالمراجع مربكة بما يكفي دون مرادفات عديمة الفائدة.)"
247
248 #. type: IX
249 #: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron
250 #: opensuse-leap-16-1 opensuse-tumbleweed
251 #, no-wrap
252 msgid "reference, symbolic reference, soft symbolic reference soft reference"
253 msgstr "مرجع، مرجع رمزي، مرجع رمزي ناعم مرجع ناعم"
254
255 #. type: Plain text
256 #: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron
257 #: opensuse-leap-16-1 opensuse-tumbleweed
258 msgid ""
259 "In contrast, hard references are more like hard links in a Unix file system: "
260 "They are used to access an underlying object without concern for what its "
261 "(other) name is. When the word \"reference\" is used without an adjective, "
262 "as in the following paragraph, it is usually talking about a hard reference."
263 msgstr ""
264 "في المقابل، المراجع الصلبة تشبه الروابط الصلبة في نظام ملفات يونكس: فهي "
265 "تُستخدم للوصول إلى كائن أساسي دون الاهتمام باسمه (الآخر). عندما تُستخدم كلمة "
266 "\"مرجع\" دون صفة، كما في الفقرة التالية، فإنها عادة ما تتحدث عن مرجع صلب."
267
268 #. type: IX
269 #: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron
270 #: opensuse-leap-16-1 opensuse-tumbleweed
271 #, no-wrap
272 msgid "reference, hard hard reference"
273 msgstr "مرجع، مرجع صلب"
274
275 #. type: Plain text
276 #: debian-trixie debian-unstable
277 msgid ""
278 "References are easy to use in Perl. There is just one overriding principle: "
279 "in general, Perl does no implicit referencing or dereferencing. When a "
280 "scalar is holding a reference, it always behaves as a simple scalar. It "
281 "doesn't magically start being an array or hash or subroutine; you have to "
282 "tell it explicitly to do so, by dereferencing it."
283 msgstr ""
284 "المراجع سهلة الاستخدام في بيرل. هناك مبدأ رئيس واحد فقط: بشكل عام، لا تقوم "
285 "بيرل بأي إسناد مرجعي أو فك إسناد مرجعي ضمني. عندما تحمل سلمية مرجعًا، فإنها "
286 "تتصرف دائمًا كسلمية بسيطة. لا تبدأ سحريًا في أن تكون مصفوفة أو مجزأة أو دالة "
287 "فرعية؛ يجب عليك إخبارها صراحة بالقيام بذلك عن طريق فك إسنادها المرجعي."
288
289 #. type: IX
290 #: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron
291 #: opensuse-leap-16-1 opensuse-tumbleweed
292 #, no-wrap
293 msgid "Making References"
294 msgstr "إنشاء المراجع"
295
296 #. type: IX
297 #: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron
298 #: opensuse-leap-16-1 opensuse-tumbleweed
299 #, no-wrap
300 msgid "reference, creation referencing"
301 msgstr "مرجع، إنشاء إسناد مرجعي"
302
303 #. type: IX
304 #: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron
305 #: opensuse-leap-16-1 opensuse-tumbleweed
306 #, no-wrap
307 msgid "Subsection"
308 msgstr "Subsection"
309
310 #. type: Plain text
311 #: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron
312 #: opensuse-leap-16-1 opensuse-tumbleweed
313 msgid "References can be created in several ways."
314 msgstr "يمكن إنشاء المراجع بعدة طرق."
315
316 #. type: Plain text
317 #: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron
318 #: opensuse-leap-16-1 opensuse-tumbleweed
319 msgid "I<Backslash Operator>"
320 msgstr "I<عامل الخط المائل العكسي>"
321
322 #. type: IX
323 #: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron
324 #: opensuse-leap-16-1 opensuse-tumbleweed
325 #, no-wrap
326 msgid "\\ backslash"
327 msgstr "\\ خط مائل عكسي"
328
329 #. type: IX
330 #: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron
331 #: opensuse-leap-16-1 opensuse-tumbleweed
332 #, no-wrap
333 msgid "Backslash Operator"
334 msgstr "عامل الخط المائل العكسي"
335
336 #. type: Plain text
337 #: debian-trixie debian-unstable
338 msgid ""
339 "By using the backslash operator on a variable, subroutine, or value. (This "
340 "works much like the & (address-of) operator in C.) This typically creates "
341 "I<another> reference to a variable, because there's already a reference to "
342 "the variable in the symbol table. But the symbol table reference might go "
343 "away, and you'll still have the reference that the backslash returned. Here "
344 "are some examples:"
345 msgstr ""
346 "باستخدام عامل الخط المائل العكسي على متغير، أو دالة فرعية، أو قيمة. (يعمل "
347 "هذا بشكل يشبه إلى حد كبير عامل & (عنوان) في لغة C.) يؤدي هذا عادةً إلى إنشاء "
348 "مرجع I<آخر> لمتغير، لأن هناك بالفعل مرجعًا للمتغير في جدول الرموز. ولكن مرجع "
349 "جدول الرموز قد يختفي، وستظل تمتلك المرجع الذي أعاده الخط المائل العكسي. إليك "
350 "بعض الأمثلة:"
351
352 #. type: Plain text
353 #: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron
354 #: opensuse-leap-16-1 opensuse-tumbleweed
355 #, no-wrap
356 msgid ""
357 "\\& $scalarref = \\e$foo;\n"
358 "\\& $arrayref = \\e@ARGV;\n"
359 "\\& $hashref = \\e%ENV;\n"
360 "\\& $coderef = \\e&handler;\n"
361 "\\& $globref = \\e*foo;\n"
362 msgstr ""
363 "\\& $scalarref = \\e$foo;\n"
364 "\\& $arrayref = \\e@ARGV;\n"
365 "\\& $hashref = \\e%ENV;\n"
366 "\\& $coderef = \\e&handler;\n"
367 "\\& $globref = \\e*foo;\n"
368
369 #. type: Plain text
370 #: debian-trixie debian-unstable
371 msgid ""
372 "It isn't possible to create a true reference to an IO handle (filehandle or "
373 "dirhandle) using the backslash operator. The most you can get is a "
374 "reference to a typeglob, which is actually a complete symbol table entry. "
375 "But see the explanation of the CW<*foo{THING}> syntax below. However, you "
376 "can still use type globs and globrefs as though they were IO handles."
377 msgstr ""
378 "ليس من الممكن إنشاء مرجع حقيقي لمقبض إدخال/إخراج (مقبض ملف أو مقبض دليل) "
379 "باستخدام عامل الخط المائل العكسي. أقصى ما يمكنك الحصول عليه هو مرجع لـ "
380 "typeglob، وهو في الواقع إدخال كامل في جدول الرموز. ولكن انظر شرح بناء الجملة "
381 "CW<*foo{THING}> أدناه. ومع ذلك، لا يزال بإمكانك استخدام type globs و "
382 "globrefs كما لو كانت مقابض إدخال/إخراج."
383
384 #. type: Plain text
385 #: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron
386 #: opensuse-leap-16-1 opensuse-tumbleweed
387 msgid "I<Square Brackets>"
388 msgstr "I<الأقواس المربعة>"
389
390 #. type: IX
391 #: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron
392 #: opensuse-leap-16-1 opensuse-tumbleweed
393 #, no-wrap
394 msgid "array, anonymous [ [] square bracket bracket, square arrayref array reference reference, array"
395 msgstr "مصفوفة، مجهولة [ [] قوس مربع قوس، مربع مرجع مصفوفة مرجع، مصفوفة"
396
397 #. type: IX
398 #: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron
399 #: opensuse-leap-16-1 opensuse-tumbleweed
400 #, no-wrap
401 msgid "Square Brackets"
402 msgstr "الأقواس المربعة"
403
404 #. type: Plain text
405 #: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron
406 #: opensuse-leap-16-1 opensuse-tumbleweed
407 msgid "A reference to an anonymous array can be created using square brackets:"
408 msgstr "يمكن إنشاء مرجع لمصفوفة مجهولة باستخدام الأقواس المربعة:"
409
410 #. type: Plain text
411 #: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron
412 #: opensuse-leap-16-1 opensuse-tumbleweed
413 #, no-wrap
414 msgid "\\& $arrayref = [1, 2, [\\*(Aqa\\*(Aq, \\*(Aqb\\*(Aq, \\*(Aqc\\*(Aq]];\n"
415 msgstr "\\& $arrayref = [1, 2, [\\*(Aqa\\*(Aq, \\*(Aqb\\*(Aq, \\*(Aqc\\*(Aq]];\n"
416
417 #. type: Plain text
418 #: debian-trixie debian-unstable
419 msgid ""
420 "Here we've created a reference to an anonymous array of three elements whose "
421 "final element is itself a reference to another anonymous array of three "
422 "elements. (The multidimensional syntax described later can be used to "
423 "access this. For example, after the above, CW<\\*(C`$arrayref-E<gt>[2]"
424 "[1]\\*(C'> would have the value \"b\".)"
425 msgstr ""
426 "هنا أنشأنا مرجعًا لمصفوفة مجهولة من ثلاثة عناصر، عنصرها الأخير هو نفسه مرجع "
427 "لمصفوفة مجهولة أخرى من ثلاثة عناصر. (يمكن استخدام بناء الجملة متعدد الأبعاد "
428 "الموصوف لاحقًا للوصول إلى هذا. على سبيل المثال، بعد ما سبق، ستكون لقيمة "
429 "CW<\\*(C`$arrayref-E<gt>[2][1]\\*(C'> القيمة \"b\".)"
430
431 #. type: Plain text
432 #: debian-trixie debian-unstable
433 msgid ""
434 "Taking a reference to an enumerated list is not the same as using square "
435 "brackets--instead it's the same as creating a list of references!"
436 msgstr ""
437 "أخذ مرجع لقائمة معدودة ليس هو نفسه استخدام الأقواس المربعة - بل هو نفسه "
438 "إنشاء قائمة من المراجع!"
439
440 #. type: Plain text
441 #: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron
442 #: opensuse-leap-16-1 opensuse-tumbleweed
443 #, no-wrap
444 msgid ""
445 "\\& @list = (\\e$x, \\e@y, \\e%z);\n"
446 "\\& @list = \\e($x, @y, %z); # same thing!\n"
447 msgstr ""
448 "\\& @list = (\\e$x, \\e@y, \\e%z);\n"
449 "\\& @list = \\e($x, @y, %z); # نفس الشيء!\n"
450
451 #. type: Plain text
452 #: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron
453 #: opensuse-leap-16-1 opensuse-tumbleweed
454 msgid ""
455 "As a special case, CW<\\*(C`\\e(@foo)\\*(C'> returns a list of references to "
456 "the contents of CW<@foo>, not a reference to CW<@foo> itself. Likewise for "
457 "CW<%foo>, except that the key references are to copies (since the keys are "
458 "just strings rather than full-fledged scalars)."
459 msgstr ""
460 "كحالة خاصة، يعيد CW<\\*(C`\\e(@foo)\\*(C'> قائمة مراجع لمحتويات CW<@foo>، "
461 "وليس مرجعًا لـ CW<@foo> نفسها. وبالمثل بالنسبة لـ CW<%foo>، باستثناء أن مراجع "
462 "المفاتيح تكون لنسخ (بما أن المفاتيح هي مجرد سلاسل نصية وليست سلميات كاملة)."
463
464 #. type: Plain text
465 #: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron
466 #: opensuse-leap-16-1 opensuse-tumbleweed
467 msgid "I<Curly Brackets>"
468 msgstr "I<الأقواس المعقوفة>"
469
470 #. type: IX
471 #: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron
472 #: opensuse-leap-16-1 opensuse-tumbleweed
473 #, no-wrap
474 msgid "hash, anonymous { {} curly bracket bracket, curly brace hashref hash reference reference, hash"
475 msgstr "مجزأة، مجهولة { {} قوس معقوف قوس، معقوف حاضنة مرجع مجزأة مرجع، مجزأة"
476
477 #. type: IX
478 #: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron
479 #: opensuse-leap-16-1 opensuse-tumbleweed
480 #, no-wrap
481 msgid "Curly Brackets"
482 msgstr "الأقواس المعقوفة"
483
484 #. type: Plain text
485 #: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron
486 #: opensuse-leap-16-1 opensuse-tumbleweed
487 msgid "A reference to an anonymous hash can be created using curly brackets:"
488 msgstr "يمكن إنشاء مرجع لمصفوفة مجزأة مجهولة باستخدام الأقواس المعقوفة:"
489
490 #. type: Plain text
491 #: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron
492 #: opensuse-leap-16-1 opensuse-tumbleweed
493 #, no-wrap
494 msgid ""
495 "\\& $hashref = {\n"
496 "\\& \\*(AqAdam\\*(Aq =E<gt> \\*(AqEve\\*(Aq,\n"
497 "\\& \\*(AqClyde\\*(Aq =E<gt> \\*(AqBonnie\\*(Aq,\n"
498 "\\& };\n"
499 msgstr ""
500 "\\& $hashref = {\n"
501 "\\& \\*(AqAdam\\*(Aq =E<gt> \\*(AqEve\\*(Aq,\n"
502 "\\& \\*(AqClyde\\*(Aq =E<gt> \\*(AqBonnie\\*(Aq,\n"
503 "\\& };\n"
504
505 #. type: Plain text
506 #: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron
507 #: opensuse-leap-16-1 opensuse-tumbleweed
508 msgid ""
509 "Anonymous hash and array composers like these can be intermixed freely to "
510 "produce as complicated a structure as you want. The multidimensional syntax "
511 "described below works for these too. The values above are literals, but "
512 "variables and expressions would work just as well, because assignment "
513 "operators in Perl (even within B<local()> or B<my()>) are executable "
514 "statements, not compile-time declarations."
515 msgstr ""
516 "يمكن خلط مؤلفي المجزئات والمصفوفات المجهولة مثل هذه بحرية لإنتاج هيكل معقد "
517 "كما تريد. بناء الجملة متعدد الأبعاد الموصوف أدناه يعمل لهذه أيضًا. القيم "
518 "أعلاه هي قيم حرفية، لكن المتغيرات والتعبيرات ستعمل بنفس الكفاءة، لأن عوامل "
519 "التعيين في بيرل (حتى داخل B<local()> أو B<my()>) هي عبارات قابلة للتنفيذ، "
520 "وليست تصريحات وقت التصريف."
521
522 #. type: Plain text
523 #: debian-trixie debian-unstable
524 msgid ""
525 "Because curly brackets (braces) are used for several other things including "
526 "BLOCKs, you may occasionally have to disambiguate braces at the beginning of "
527 "a statement by putting a CW<\\*(C`+\\*(C'> or a CW<\\*(C`return\\*(C'> in "
528 "front so that Perl realizes the opening brace isn't starting a BLOCK. The "
529 "economy and mnemonic value of using curlies is deemed worth this occasional "
530 "extra hassle."
531 msgstr ""
532 "نظرًا لأن الأقواس المعقوفة (الحاضنات) تُستخدم لعدة أشياء أخرى بما في ذلك الكتل "
533 "(BLOCKs)، فقد تضطر أحيانًا إلى إزالة اللبس عن الحاضنات في بداية العبارة بوضع "
534 "CW<\\*(C`+\\*(C'> أو CW<\\*(C`return\\*(C'> أمامها حتى تدرك بيرل أن الحاضنة "
535 "الافتتاحية لا تبدأ كتلة. تعتبر القيمة الاقتصادية والتذكارية لاستخدام الأقواس "
536 "المعقوفة تستحق هذا العناء الإضافي العرضي."
537
538 #. type: Plain text
539 #: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron
540 #: opensuse-leap-16-1 opensuse-tumbleweed
541 msgid ""
542 "For example, if you wanted a function to make a new hash and return a "
543 "reference to it, you have these options:"
544 msgstr ""
545 "على سبيل المثال، إذا كنت تريد دالة لإنشاء مجزأة جديدة وإعادة مرجع إليها، "
546 "فلديك هذه الخيارات:"
547
548 #. type: Plain text
549 #: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron
550 #: opensuse-leap-16-1 opensuse-tumbleweed
551 #, no-wrap
552 msgid ""
553 "\\& sub hashem { { @_ } } # silently wrong\n"
554 "\\& sub hashem { +{ @_ } } # ok\n"
555 "\\& sub hashem { return { @_ } } # ok\n"
556 msgstr ""
557 "\\& sub hashem { { @_ } } # خاطئة بصمت\n"
558 "\\& sub hashem { +{ @_ } } # جيدة\n"
559 "\\& sub hashem { return { @_ } } # جيدة\n"
560
561 #. type: Plain text
562 #: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron
563 #: opensuse-leap-16-1 opensuse-tumbleweed
564 msgid "On the other hand, if you want the other meaning, you can do this:"
565 msgstr "من ناحية أخرى، إذا كنت تريد المعنى الآخر، يمكنك فعل ذلك:"
566
567 #. type: Plain text
568 #: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron
569 #: opensuse-leap-16-1 opensuse-tumbleweed
570 #, no-wrap
571 msgid ""
572 "\\& sub showem { { @_ } } # ambiguous (currently ok,\n"
573 "\\& # but may change)\n"
574 "\\& sub showem { {; @_ } } # ok\n"
575 "\\& sub showem { { return @_ } } # ok\n"
576 msgstr ""
577 "\\& sub showem { { @_ } } # غامضة (جيدة حاليًا،\n"
578 "\\& # ولكن قد تتغير)\n"
579 "\\& sub showem { {; @_ } } # جيدة\n"
580 "\\& sub showem { { return @_ } } # جيدة\n"
581
582 #. type: Plain text
583 #: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron
584 #: opensuse-leap-16-1 opensuse-tumbleweed
585 msgid ""
586 "The leading CW<\\*(C`+{\\*(C'> and CW<\\*(C`{;\\*(C'> always serve to "
587 "disambiguate the expression to mean either the HASH reference, or the BLOCK."
588 msgstr ""
589 "تعمل العلامات البادئة CW<\\*(C`+{\\*(C'> و CW<\\*(C`{;\\*(C'> دائمًا على "
590 "إزالة الغموض عن التعبير ليعني إما مرجع HASH أو الكتلة (BLOCK)."
591
592 #. type: Plain text
593 #: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron
594 #: opensuse-leap-16-1 opensuse-tumbleweed
595 msgid "I<Anonymous Subroutines>"
596 msgstr "I<الدوال الفرعية المجهولة>"
597
598 #. type: IX
599 #: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron
600 #: opensuse-leap-16-1 opensuse-tumbleweed
601 #, no-wrap
602 msgid "subroutine, anonymous subroutine, reference reference, subroutine scope, lexical closure lexical lexical scope"
603 msgstr "دالة فرعية، دالة فرعية مجهولة، مرجع مرجع، نطاق دالة فرعية، إغلاق معجمي معجمي نطاق معجمي"
604
605 #. type: IX
606 #: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron
607 #: opensuse-leap-16-1 opensuse-tumbleweed
608 #, no-wrap
609 msgid "Anonymous Subroutines"
610 msgstr "الدوال الفرعية المجهولة"
611
612 #. type: Plain text
613 #: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron
614 #: opensuse-leap-16-1 opensuse-tumbleweed
615 msgid ""
616 "A reference to an anonymous subroutine can be created by using "
617 "\\&CW<\\*(C`sub\\*(C'> without a subname:"
618 msgstr ""
619 "يمكن إنشاء مرجع لدالة فرعية مجهولة باستخدام \\&CW<\\*(C`sub\\*(C'> بدون اسم "
620 "للدالة:"
621
622 #. type: Plain text
623 #: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron
624 #: opensuse-leap-16-1 opensuse-tumbleweed
625 #, no-wrap
626 msgid "\\& $coderef = sub { print \"Boink!\\en\" };\n"
627 msgstr "\\& $coderef = sub { print \"Boink!\\en\" };\n"
628
629 #. type: Plain text
630 #: debian-trixie debian-unstable
631 msgid ""
632 "Note the semicolon. Except for the code inside not being immediately "
633 "executed, a CW<\\*(C`sub {}\\*(C'> is not so much a declaration as it is an "
634 "operator, like CW<\\*(C`do{}\\*(C'> or CW<\\*(C`eval{}\\*(C'>. (However, no "
635 "matter how many times you execute that particular line (unless you're in an "
636 "\\&CW<eval(\"...\")>), CW<$coderef> will still have a reference to the "
637 "I<same> anonymous subroutine.)"
638 msgstr ""
639 "لاحظ الفاصلة المنقوطة. باستثناء أن الكود الموجود بالداخل لا يُنفذ على الفور، "
640 "فإن CW<\\*(C`sub {}\\*(C'> ليس تصريحًا بقدر ما هو عامل، مثل "
641 "CW<\\*(C`do{}\\*(C'> أو CW<\\*(C`eval{}\\*(C'>. (ومع ذلك، بغض النظر عن عدد "
642 "المرات التي تنفذ فيها هذا السطر المحدد (إلا إذا كنت في \\&CW<eval(\"..."
643 "\")>)، سيظل CW<$coderef> يمتلك مرجعًا لـ I<نفس> الدالة الفرعية المجهولة.)"
644
645 #. type: Plain text
646 #: debian-trixie debian-unstable
647 msgid ""
648 "Anonymous subroutines act as closures with respect to B<my()> variables, "
649 "that is, variables lexically visible within the current scope. Closure is a "
650 "notion out of the Lisp world that says if you define an anonymous function "
651 "in a particular lexical context, it pretends to run in that context even "
652 "when it's called outside the context."
653 msgstr ""
654 "تعمل الدوال الفرعية المجهولة كإغلاقات (closures) فيما يتعلق بمتغيرات "
655 "B<my()>، أي المتغيرات المرئية معجميًا داخل النطاق الحالي. الإغلاق هو مفهوم من "
656 "عالم Lisp يقول إنه إذا قمت بتعريف دالة مجهولة في سياق معجمي معين، فإنها "
657 "تتظاهر بالعمل في ذلك السياق حتى عندما يتم استدعاؤها خارج السياق."
658
659 #. type: Plain text
660 #: debian-trixie debian-unstable
661 msgid ""
662 "In human terms, it's a funny way of passing arguments to a subroutine when "
663 "you define it as well as when you call it. It's useful for setting up "
664 "little bits of code to run later, such as callbacks. You can even do object-"
665 "oriented stuff with it, though Perl already provides a different mechanism "
666 "to do that--see perlobj."
667 msgstr ""
668 "بالمصطلحات البشرية، إنها طريقة ممتعة لتمرير المعاملات إلى دالة فرعية عند "
669 "تعريفها وكذلك عند استدعائها. إنها مفيدة لإعداد أجزاء صغيرة من الكود لتعمل "
670 "لاحقًا، مثل الاستدعاءات الراجعة (callbacks). يمكنك حتى القيام بأشياء كائنية "
671 "التوجه بها، على الرغم من أن بيرل توفر بالفعل آلية مختلفة للقيام بذلك - انظر "
672 "perlobj."
673
674 #. type: Plain text
675 #: debian-trixie debian-unstable
676 msgid ""
677 "You might also think of closure as a way to write a subroutine template "
678 "without using B<eval()>. Here's a small example of how closures work:"
679 msgstr ""
680 "قد تفكر أيضًا في الإغلاق كطريقة لكتابة قالب دالة فرعية دون استخدام B<eval()>. "
681 "إليك مثال صغير على كيفية عمل الإغلاقات:"
682
683 #. type: Plain text
684 #: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron
685 #: opensuse-leap-16-1 opensuse-tumbleweed
686 #, no-wrap
687 msgid ""
688 "\\& sub newprint {\n"
689 "\\& my $x = shift;\n"
690 "\\& return sub { my $y = shift; print \"$x, $y!\\en\"; };\n"
691 "\\& }\n"
692 "\\& $h = newprint(\"Howdy\");\n"
693 "\\& $g = newprint(\"Greetings\");\n"
694 "\\&\n"
695 "\\& # Time passes...\n"
696 "\\&\n"
697 "\\& &$h(\"world\");\n"
698 "\\& &$g(\"earthlings\");\n"
699 msgstr ""
700 "\\& sub newprint {\n"
701 "\\& my $x = shift;\n"
702 "\\& return sub { my $y = shift; print \"$x, $y!\\en\"; };\n"
703 "\\& }\n"
704 "\\& $h = newprint(\"Howdy\");\n"
705 "\\& $g = newprint(\"Greetings\");\n"
706 "\\&\n"
707 "\\& # يمر الوقت...\n"
708 "\\&\n"
709 "\\& &$h(\"world\");\n"
710 "\\& &$g(\"earthlings\");\n"
711
712 #. type: Plain text
713 #: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron
714 #: opensuse-leap-16-1 opensuse-tumbleweed
715 msgid "This prints"
716 msgstr "يطبع هذا"
717
718 #. type: Plain text
719 #: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron
720 #: opensuse-leap-16-1 opensuse-tumbleweed
721 #, no-wrap
722 msgid ""
723 "\\& Howdy, world!\n"
724 "\\& Greetings, earthlings!\n"
725 msgstr ""
726 "\\& Howdy, world!\n"
727 "\\& Greetings, earthlings!\n"
728
729 #. type: Plain text
730 #: debian-trixie debian-unstable
731 msgid ""
732 "Note particularly that CW<$x> continues to refer to the value passed into "
733 "B<newprint()> I<despite> \"my CW<$x>\" having gone out of scope by the time "
734 "the anonymous subroutine runs. That's what a closure is all about."
735 msgstr ""
736 "لاحظ بشكل خاص أن CW<$x> يستمر في الإشارة إلى القيمة الممررة إلى "
737 "B<newprint()> I<على الرغم> من خروج \"my CW<$x>\" عن النطاق بحلول الوقت الذي "
738 "تعمل فيه الدالة الفرعية المجهولة. هذا هو جوهر الإغلاق."
739
740 #. type: Plain text
741 #: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron
742 #: opensuse-leap-16-1 opensuse-tumbleweed
743 msgid ""
744 "This applies only to lexical variables, by the way. Dynamic variables "
745 "continue to work as they have always worked. Closure is not something that "
746 "most Perl programmers need trouble themselves about to begin with."
747 msgstr ""
748 "بالمناسبة، ينطبق هذا فقط على المتغيرات المعجمية. تستمر المتغيرات الديناميكية "
749 "في العمل كما عملت دائمًا. الإغلاق ليس شيئًا يحتاج معظم مبرمجي بيرل لإزعاج "
750 "أنفسهم به في البداية."
751
752 #. type: Plain text
753 #: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron
754 #: opensuse-leap-16-1 opensuse-tumbleweed
755 msgid "I<Constructors>"
756 msgstr "I<المنشئات>"
757
758 #. type: IX
759 #: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron
760 #: opensuse-leap-16-1 opensuse-tumbleweed
761 #, no-wrap
762 msgid "constructor new"
763 msgstr "منشئ جديد"
764
765 #. type: IX
766 #: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron
767 #: opensuse-leap-16-1 opensuse-tumbleweed
768 #, no-wrap
769 msgid "Constructors"
770 msgstr "المنشئات"
771
772 #. type: Plain text
773 #: debian-trixie debian-unstable
774 msgid ""
775 "References are often returned by special subroutines called constructors. "
776 "Perl objects are just references to a special type of object that happens to "
777 "know which package it's associated with. Constructors are just special "
778 "subroutines that know how to create that association. They do so by "
779 "starting with an ordinary reference, and it remains an ordinary reference "
780 "even while it's also being an object. Constructors are often named "
781 "CW<new()>. You I<can> call them indirectly:"
782 msgstr ""
783 "غالبًا ما تُعاد المراجع بواسطة دوال فرعية خاصة تسمى المنشئات (constructors). "
784 "كائنات بيرل هي مجرد مراجع لنوع خاص من الكائنات يصادف أنه يعرف الحزمة المرتبط "
785 "بها. المنشئات هي مجرد دوال فرعية خاصة تعرف كيفية إنشاء ذلك الارتباط. وهي "
786 "تفعل ذلك بالبدء بمرجع عادي، ويظل مرجعًا عاديًا حتى أثناء كونه كائنًا أيضًا. "
787 "غالبًا ما تُسمى المنشئات CW<new()>. I<يمكنك> استدعاؤها بشكل غير مباشر:"
788
789 #. type: Plain text
790 #: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron
791 #: opensuse-leap-16-1 opensuse-tumbleweed
792 #, no-wrap
793 msgid "\\& $objref = new Doggie( Tail =E<gt> \\*(Aqshort\\*(Aq, Ears =E<gt> \\*(Aqlong\\*(Aq );\n"
794 msgstr "\\& $objref = new Doggie( Tail =E<gt> \\*(Aqshort\\*(Aq, Ears =E<gt> \\*(Aqlong\\*(Aq );\n"
795
796 #. type: Plain text
797 #: debian-trixie debian-unstable
798 msgid ""
799 "But that can produce ambiguous syntax in certain cases, so it's often better "
800 "to use the direct method invocation approach:"
801 msgstr ""
802 "لكن هذا قد ينتج بناء جملة غامضًا في حالات معينة، لذا غالبًا ما يكون من الأفضل "
803 "استخدام نهج استدعاء الطريقة المباشر:"
804
805 #. type: Plain text
806 #: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron
807 #: opensuse-leap-16-1 opensuse-tumbleweed
808 #, no-wrap
809 msgid ""
810 "\\& $objref = Doggie-E<gt>new(Tail =E<gt> \\*(Aqshort\\*(Aq, Ears =E<gt> \\*(Aqlong\\*(Aq);\n"
811 "\\&\n"
812 "\\& use Term::Cap;\n"
813 "\\& $terminal = Term::Cap-E<gt>Tgetent( { OSPEED =E<gt> 9600 });\n"
814 "\\&\n"
815 "\\& use Tk;\n"
816 "\\& $main = MainWindow-E<gt>new();\n"
817 "\\& $menubar = $main-E<gt>Frame(-relief =E<gt> \"raised\",\n"
818 "\\& -borderwidth =E<gt> 2)\n"
819 msgstr ""
820 "\\& $objref = Doggie-E<gt>new(Tail =E<gt> \\*(Aqshort\\*(Aq, Ears =E<gt> \\*(Aqlong\\*(Aq);\n"
821 "\\&\n"
822 "\\& use Term::Cap;\n"
823 "\\& $terminal = Term::Cap-E<gt>Tgetent( { OSPEED =E<gt> 9600 });\n"
824 "\\&\n"
825 "\\& use Tk;\n"
826 "\\& $main = MainWindow-E<gt>new();\n"
827 "\\& $menubar = $main-E<gt>Frame(-relief =E<gt> \"raised\",\n"
828 "\\& -borderwidth =E<gt> 2)\n"
829
830 #. type: Plain text
831 #: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron
832 #: opensuse-leap-16-1 opensuse-tumbleweed
833 msgid ""
834 "This indirect object syntax is only available when \\&CW<\\*(C`use feature "
835 "\"indirect\"\\*(C'> is in effect, and that is not the case when CW<\\*(C`use "
836 "v5.36\\*(C'> (or higher) is requested, it is best to avoid indirect object "
837 "syntax entirely."
838 msgstr ""
839 "يتوفر بناء جملة الكائن غير المباشر هذا فقط عندما تكون ميزة \\&CW<\\*(C`use "
840 "feature \"indirect\"\\*(C'> فعالة، وهذا ليس هو الحال عند طلب CW<\\*(C`use "
841 "v5.36\\*(C'> (أو أعلى)، فمن الأفضل تجنب بناء جملة الكائن غير المباشر تمامًا."
842
843 #. type: Plain text
844 #: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron
845 #: opensuse-leap-16-1 opensuse-tumbleweed
846 msgid "I<Autovivification>"
847 msgstr "I<النشوء الذاتي (Autovivification)>"
848
849 #. type: IX
850 #: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron
851 #: opensuse-leap-16-1 opensuse-tumbleweed
852 #, no-wrap
853 msgid "autovivification"
854 msgstr "النشوء الذاتي"
855
856 #. type: IX
857 #: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron
858 #: opensuse-leap-16-1 opensuse-tumbleweed
859 #, no-wrap
860 msgid "Autovivification"
861 msgstr "النشوء الذاتي"
862
863 #. type: Plain text
864 #: debian-trixie debian-unstable
865 msgid ""
866 "References of the appropriate type can spring into existence if you "
867 "dereference them in a context that assumes they exist. Because we haven't "
868 "talked about dereferencing yet, we can't show you any examples yet."
869 msgstr ""
870 "يمكن للمراجع من النوع المناسب أن تظهر إلى الوجود إذا قمت بفك إسنادها المرجعي "
871 "في سياق يفترض وجودها. ولأننا لم نتحدث عن فك الإسناد المرجعي بعد، لا يمكننا "
872 "أن نعرض لك أي أمثلة بعد."
873
874 #. type: Plain text
875 #: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron
876 #: opensuse-leap-16-1 opensuse-tumbleweed
877 msgid "I<Typeglob Slots>"
878 msgstr "I<فتحات Typeglob>"
879
880 #. type: IX
881 #: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron
882 #: opensuse-leap-16-1 opensuse-tumbleweed
883 #, no-wrap
884 msgid "*foo{THING} *"
885 msgstr "*foo{THING} *"
886
887 #. type: IX
888 #: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron
889 #: opensuse-leap-16-1 opensuse-tumbleweed
890 #, no-wrap
891 msgid "Typeglob Slots"
892 msgstr "فتحات Typeglob"
893
894 #. type: Plain text
895 #: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron
896 #: opensuse-leap-16-1 opensuse-tumbleweed
897 msgid ""
898 "A reference can be created by using a special syntax, lovingly known as the "
899 "*foo{THING} syntax. *foo{THING} returns a reference to the THING slot in "
900 "*foo (which is the symbol table entry which holds everything known as foo)."
901 msgstr ""
902 "يمكن إنشاء مرجع باستخدام بناء جملة خاص، يُعرف بمحبة باسم بناء جملة "
903 "*foo{THING}. يعيد *foo{THING} مرجعًا لفتحة THING في *foo (وهي إدخال جدول "
904 "الرموز الذي يحمل كل شيء يُعرف باسم foo)."
905
906 #. type: Plain text
907 #: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron
908 #: opensuse-leap-16-1 opensuse-tumbleweed
909 #, no-wrap
910 msgid ""
911 "\\& $scalarref = *foo{SCALAR};\n"
912 "\\& $arrayref = *ARGV{ARRAY};\n"
913 "\\& $hashref = *ENV{HASH};\n"
914 "\\& $coderef = *handler{CODE};\n"
915 "\\& $ioref = *STDIN{IO};\n"
916 "\\& $globref = *foo{GLOB};\n"
917 "\\& $formatref = *foo{FORMAT};\n"
918 "\\& $globname = *foo{NAME}; # \"foo\"\n"
919 "\\& $pkgname = *foo{PACKAGE}; # \"main\"\n"
920 msgstr ""
921 "\\& $scalarref = *foo{SCALAR};\n"
922 "\\& $arrayref = *ARGV{ARRAY};\n"
923 "\\& $hashref = *ENV{HASH};\n"
924 "\\& $coderef = *handler{CODE};\n"
925 "\\& $ioref = *STDIN{IO};\n"
926 "\\& $globref = *foo{GLOB};\n"
927 "\\& $formatref = *foo{FORMAT};\n"
928 "\\& $globname = *foo{NAME}; # \"foo\"\n"
929 "\\& $pkgname = *foo{PACKAGE}; # \"main\"\n"
930
931 #. type: Plain text
932 #: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron
933 #: opensuse-leap-16-1 opensuse-tumbleweed
934 msgid ""
935 "Most of these are self-explanatory, but CW<*foo{IO}> deserves special "
936 "attention. It returns the IO handle, used for file handles (\"open\" in "
937 "perlfunc), sockets (\"socket\" in perlfunc and \"socketpair\" in perlfunc), "
938 "and directory handles (\"opendir\" in perlfunc). For compatibility with "
939 "previous versions of Perl, CW<*foo{FILEHANDLE}> is a synonym for CW<*foo{IO}"
940 ">, though it is discouraged, to encourage a consistent use of one name: IO. "
941 "On perls between v5.8 and v5.22, it will issue a deprecation warning, but "
942 "this deprecation has since been rescinded."
943 msgstr ""
944 "معظم هذه الأشياء تشرح نفسها، لكن CW<*foo{IO}> يستحق اهتمامًا خاصًا. فهو يعيد "
945 "مقبض الإدخال/الإخراج، المستخدم لمقابض الملفات (\"open\" في perlfunc)، "
946 "والمقابس (sockets) (\"socket\" في perlfunc و \"socketpair\" في perlfunc)، "
947 "ومقابض الأدلة (\"opendir\" في perlfunc). للتوافق مع الإصدارات السابقة من "
948 "بيرل، يعد CW<*foo{FILEHANDLE}> مرادفًا لـ CW<*foo{IO}>، على الرغم من عدم "
949 "تشجيعه، للتشجيع على الاستخدام المتسق لاسم واحد: IO. في إصدارات بيرل بين v5.8 "
950 "و v5.22، سيصدر تحذير بشأن الإهمال، ولكن تم التراجع عن هذا الإهمال منذ ذلك "
951 "الحين."
952
953 #. type: Plain text
954 #: debian-trixie debian-unstable
955 msgid ""
956 "\\&CW<*foo{THING}> returns undef if that particular THING hasn't been used "
957 "yet, except in the case of scalars. CW<*foo{SCALAR}> returns a reference to "
958 "an anonymous scalar if CW<$foo> hasn't been used yet. This might change in "
959 "a future release."
960 msgstr ""
961 "يعيد \\&CW<*foo{THING}> القيمة undef إذا لم يُستخدم THING المحدد بعد، "
962 "باستثناء حالة السلميات. يعيد CW<*foo{SCALAR}> مرجعًا لسلمية مجهولة إذا لم "
963 "يُستخدم CW<$foo> بعد. قد يتغير هذا في إصدار مستقبلي."
964
965 #. type: Plain text
966 #: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron
967 #: opensuse-leap-16-1 opensuse-tumbleweed
968 msgid ""
969 "\\&CW<*foo{NAME}> and CW<*foo{PACKAGE}> are the exception, in that they "
970 "return strings, rather than references. These return the package and name "
971 "of the typeglob itself, rather than one that has been assigned to it. So, "
972 "after \\&CW<\\*(C`*foo=*Foo::bar\\*(C'>, CW<*foo> will become \"*Foo::bar\" "
973 "when used as a string, but CW<*foo{PACKAGE}> and CW<*foo{NAME}> will "
974 "continue to produce \"main\" and \"foo\", respectively."
975 msgstr ""
976 "يعد \\&CW<*foo{NAME}> و CW<*foo{PACKAGE}> الاستثناء، حيث يعيدان سلاسل نصية "
977 "بدلاً من المراجع. وتعيد هذه الحزمة والاسم الخاص بـ typeglob نفسه، بدلاً من تلك "
978 "التي عُينت له. لذا، بعد \\&CW<\\*(C`*foo=*Foo::bar\\*(C'>، سيصبح CW<*foo> هو "
979 "\"*Foo::bar\" عند استخدامه كسلسلة نصية، لكن CW<*foo{PACKAGE}> و CW<*foo{NAME}"
980 "> سيستمران في إنتاج \"main\" و \"foo\" على التوالي."
981
982 #. type: Plain text
983 #: debian-trixie debian-unstable
984 msgid ""
985 "\\&CW<*foo{IO}> is an alternative to the CW<*HANDLE> mechanism given in "
986 "\"Typeglobs and Filehandles\" in perldata for passing filehandles into or "
987 "out of subroutines, or storing into larger data structures. Its "
988 "disadvantage is that it won't create a new filehandle for you. Its "
989 "advantage is that you have less risk of clobbering more than you want to "
990 "with a typeglob assignment. (It still conflates file and directory handles, "
991 "though.) However, if you assign the incoming value to a scalar instead of a "
992 "typeglob as we do in the examples below, there's no risk of that happening."
993 msgstr ""
994 "\\&CW<*foo{IO}> هو بديل لآلية CW<*HANDLE> المذكورة في \"Typeglobs and "
995 "Filehandles\" في perldata لتمرير مقابض الملفات إلى أو من الدوال الفرعية، أو "
996 "تخزينها في هياكل بيانات أكبر. عيبه هو أنه لن ينشئ مقبض ملف جديد لك. ميزته هي "
997 "أن لديك مخاطرة أقل في تخريب أكثر مما تريد بتعيين typeglob. (إنه لا يزال يخلط "
998 "بين مقابض الملفات والأدلة، رغم ذلك.) ومع ذلك، إذا قمت بتعيين القيمة الواردة "
999 "إلى سلمية بدلاً من typeglob كما نفعل في الأمثلة أدناه، فلا يوجد خطر من حدوث "
1000 "ذلك."
1001
1002 #. type: Plain text
1003 #: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron
1004 #: opensuse-leap-16-1 opensuse-tumbleweed
1005 #, no-wrap
1006 msgid ""
1007 "\\& splutter(*STDOUT); # pass the whole glob\n"
1008 "\\& splutter(*STDOUT{IO}); # pass both file and dir handles\n"
1009 "\\&\n"
1010 "\\& sub splutter {\n"
1011 "\\& my $fh = shift;\n"
1012 "\\& print $fh \"her um well a hmmm\\en\";\n"
1013 "\\& }\n"
1014 "\\&\n"
1015 "\\& $rec = get_rec(*STDIN); # pass the whole glob\n"
1016 "\\& $rec = get_rec(*STDIN{IO}); # pass both file and dir handles\n"
1017 "\\&\n"
1018 "\\& sub get_rec {\n"
1019 "\\& my $fh = shift;\n"
1020 "\\& return scalar E<lt>$fhE<gt>;\n"
1021 "\\& }\n"
1022 msgstr ""
1023 "\\& splutter(*STDOUT); # تمرير الـ glob بالكامل\n"
1024 "\\& splutter(*STDOUT{IO}); # تمرير مقابض الملفات والأدلة معًا\n"
1025 "\\&\n"
1026 "\\& sub splutter {\n"
1027 "\\& my $fh = shift;\n"
1028 "\\& print $fh \"her um well a hmmm\\en\";\n"
1029 "\\& }\n"
1030 "\\&\n"
1031 "\\& $rec = get_rec(*STDIN); # تمرير الـ glob بالكامل\n"
1032 "\\& $rec = get_rec(*STDIN{IO}); # تمرير مقابض الملفات والأدلة معًا\n"
1033 "\\&\n"
1034 "\\& sub get_rec {\n"
1035 "\\& my $fh = shift;\n"
1036 "\\& return scalar E<lt>$fhE<gt>;\n"
1037 "\\& }\n"
1038
1039 #. type: IX
1040 #: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron
1041 #: opensuse-leap-16-1 opensuse-tumbleweed
1042 #, no-wrap
1043 msgid "Using References"
1044 msgstr "استخدام المراجع"
1045
1046 #. type: IX
1047 #: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron
1048 #: opensuse-leap-16-1 opensuse-tumbleweed
1049 #, no-wrap
1050 msgid "reference, use dereferencing dereference"
1051 msgstr "مرجع، استخدام فك الإسناد المرجعي فك إسناد"
1052
1053 #. type: Plain text
1054 #: debian-trixie debian-unstable
1055 msgid ""
1056 "That's it for creating references. By now you're probably dying to know how "
1057 "to use references to get back to your long-lost data. There are several "
1058 "basic methods."
1059 msgstr ""
1060 "هذا كل شيء بخصوص إنشاء المراجع. بحلول الآن ربما تتوق لمعرفة كيفية استخدام "
1061 "المراجع للعودة إلى بياناتك المفقودة منذ زمن طويل. هناك عدة طرق أساسية."
1062
1063 #. type: Plain text
1064 #: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron
1065 #: opensuse-leap-16-1 opensuse-tumbleweed
1066 msgid "I<Simple Scalar>"
1067 msgstr "I<سلمية بسيطة>"
1068
1069 #. type: IX
1070 #: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron
1071 #: opensuse-leap-16-1 opensuse-tumbleweed
1072 #, no-wrap
1073 msgid "Simple Scalar"
1074 msgstr "سلمية بسيطة"
1075
1076 #. type: Plain text
1077 #: debian-trixie debian-unstable
1078 msgid ""
1079 "Anywhere you'd put an identifier (or chain of identifiers) as part of a "
1080 "variable or subroutine name, you can replace the identifier with a simple "
1081 "scalar variable containing a reference of the correct type:"
1082 msgstr ""
1083 "في أي مكان تضع فيه معرفًا (أو سلسلة من المعرفات) كجزء من اسم متغير أو دالة "
1084 "فرعية، يمكنك استبدال المعرف بمتغير سلمي بسيط يحتوي على مرجع من النوع الصحيح:"
1085
1086 #. type: Plain text
1087 #: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron
1088 #: opensuse-leap-16-1 opensuse-tumbleweed
1089 #, no-wrap
1090 msgid ""
1091 "\\& $bar = $$scalarref;\n"
1092 "\\& push(@$arrayref, $filename);\n"
1093 "\\& $$arrayref[0] = \"January\";\n"
1094 "\\& $$hashref{\"KEY\"} = \"VALUE\";\n"
1095 "\\& &$coderef(1,2,3);\n"
1096 "\\& print $globref \"output\\en\";\n"
1097 msgstr ""
1098 "\\& $bar = $$scalarref;\n"
1099 "\\& push(@$arrayref, $filename);\n"
1100 "\\& $$arrayref[0] = \"January\";\n"
1101 "\\& $$hashref{\"KEY\"} = \"VALUE\";\n"
1102 "\\& &$coderef(1,2,3);\n"
1103 "\\& print $globref \"output\\en\";\n"
1104
1105 #. type: Plain text
1106 #: debian-trixie debian-unstable
1107 msgid ""
1108 "It's important to understand that we are specifically I<not> dereferencing "
1109 "\\&CW<$arrayref[0]> or CW<$hashref{\"KEY\"}> there. The dereference of the "
1110 "scalar variable happens I<before> it does any key lookups. Anything more "
1111 "complicated than a simple scalar variable must use methods 2 or 3 below. "
1112 "However, a \"simple scalar\" includes an identifier that itself uses method "
1113 "1 recursively. Therefore, the following prints \"howdy\"."
1114 msgstr ""
1115 "من المهم فهم أننا لا نقوم بالتحديد بفك إسناد مرجعي لـ \\&CW<$arrayref[0]> أو "
1116 "CW<$hashref{\"KEY\"}> هناك. فك إسناد المتغير السلمي يحدث I<قبل> إجراء أي "
1117 "عمليات بحث عن مفاتيح. وأي شيء أكثر تعقيدًا من متغير سلمي بسيط يجب أن يستخدم "
1118 "الطريقتين 2 أو 3 أدناه. ومع ذلك، فإن \"السلمية البسيطة\" تشمل معرفًا يستخدم "
1119 "هو نفسه الطريقة 1 بشكل متكرر. لذلك، يطبع ما يلي \"howdy\"."
1120
1121 #. type: Plain text
1122 #: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron
1123 #: opensuse-leap-16-1 opensuse-tumbleweed
1124 #, no-wrap
1125 msgid ""
1126 "\\& $refrefref = \\e\\e\\e\"howdy\";\n"
1127 "\\& print $$$$refrefref;\n"
1128 msgstr ""
1129 "\\& $refrefref = \\e\\e\\e\"howdy\";\n"
1130 "\\& print $$$$refrefref;\n"
1131
1132 #. type: Plain text
1133 #: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron
1134 #: opensuse-leap-16-1 opensuse-tumbleweed
1135 msgid "I<Block>"
1136 msgstr "I<كتلة>"
1137
1138 #. type: IX
1139 #: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron
1140 #: opensuse-leap-16-1 opensuse-tumbleweed
1141 #, no-wrap
1142 msgid "Block"
1143 msgstr "كتلة"
1144
1145 #. type: Plain text
1146 #: debian-trixie debian-unstable
1147 msgid ""
1148 "Anywhere you'd put an identifier (or chain of identifiers) as part of a "
1149 "variable or subroutine name, you can replace the identifier with a BLOCK "
1150 "returning a reference of the correct type. In other words, the previous "
1151 "examples could be written like this:"
1152 msgstr ""
1153 "في أي مكان تضع فيه معرفًا (أو سلسلة من المعرفات) كجزء من اسم متغير أو روتين "
1154 "فرعي، يمكنك استبدال المعرف بكتلة (BLOCK) تعيد مرجعًا من النوع الصحيح. بمعنى "
1155 "آخر، يمكن كتابة الأمثلة السابقة على النحو التالي:"
1156
1157 #. type: Plain text
1158 #: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron
1159 #: opensuse-leap-16-1 opensuse-tumbleweed
1160 #, no-wrap
1161 msgid ""
1162 "\\& $bar = ${$scalarref};\n"
1163 "\\& push(@{$arrayref}, $filename);\n"
1164 "\\& ${$arrayref}[0] = \"January\";\n"
1165 "\\& ${$hashref}{\"KEY\"} = \"VALUE\";\n"
1166 "\\& &{$coderef}(1,2,3);\n"
1167 "\\& $globref-E<gt>print(\"output\\en\"); # iff IO::Handle is loaded\n"
1168 msgstr ""
1169 "\\& $bar = ${$scalarref};\n"
1170 "\\& push(@{$arrayref}, $filename);\n"
1171 "\\& ${$arrayref}[0] = \"January\";\n"
1172 "\\& ${$hashref}{\"KEY\"} = \"VALUE\";\n"
1173 "\\& &{$coderef}(1,2,3);\n"
1174 "\\& $globref-E<gt>print(\"output\\en\"); # فقط إذا حُمّلت IO::Handle\n"
1175
1176 #. type: Plain text
1177 #: debian-trixie debian-unstable
1178 msgid ""
1179 "Admittedly, it's a little silly to use the curlies in this case, but the "
1180 "BLOCK can contain any arbitrary expression, in particular, subscripted "
1181 "expressions:"
1182 msgstr ""
1183 "باعتراف الجميع، من السخف قليلاً استخدام الأقواس المتعرجة في هذه الحالة، ولكن "
1184 "يمكن للكتلة (BLOCK) أن تحتوي على أي تعبير اختياري، ولا سيما التعبيرات "
1185 "المذيلة (subscripted expressions):"
1186
1187 #. type: Plain text
1188 #: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron
1189 #: opensuse-leap-16-1 opensuse-tumbleweed
1190 #, no-wrap
1191 msgid "\\& &{ $dispatch{$index} }(1,2,3); # call correct routine\n"
1192 msgstr "\\& &{ $dispatch{$index} }(1,2,3); # استدعِ الروتين الصحيح\n"
1193
1194 #. type: Plain text
1195 #: debian-trixie debian-unstable
1196 msgid ""
1197 "Because of being able to omit the curlies for the simple case of CW<$$x>, "
1198 "people often make the mistake of viewing the dereferencing symbols as proper "
1199 "operators, and wonder about their precedence. If they were, though, you "
1200 "could use parentheses instead of braces. That's not the case. Consider the "
1201 "difference below; case 0 is a short-hand version of case 1, \\&I<not> case 2:"
1202 msgstr ""
1203 "بسبب القدرة على حذف الأقواس المتعرجة في الحالة البسيطة لـ CW<$$x>، غالبًا ما "
1204 "يخطئ الناس في اعتبار رموز فك المرجعية (dereferencing) كمعاملات حقيقية، "
1205 "ويتساءلون عن أسبقيتها. لو كانت كذلك، لأمكنك استخدام الأقواس العادية بدلاً من "
1206 "الأقواس المتعرجة. الأمر ليس كذلك. انظر إلى الفرق أدناه؛ الحالة 0 هي نسخة "
1207 "مختصرة من الحالة 1، I<وليس> الحالة 2:"
1208
1209 #. type: Plain text
1210 #: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron
1211 #: opensuse-leap-16-1 opensuse-tumbleweed
1212 #, no-wrap
1213 msgid ""
1214 "\\& $$hashref{\"KEY\"} = \"VALUE\"; # CASE 0\n"
1215 "\\& ${$hashref}{\"KEY\"} = \"VALUE\"; # CASE 1\n"
1216 "\\& ${$hashref{\"KEY\"}} = \"VALUE\"; # CASE 2\n"
1217 "\\& ${$hashref-E<gt>{\"KEY\"}} = \"VALUE\"; # CASE 3\n"
1218 msgstr ""
1219 "\\& $$hashref{\"KEY\"} = \"VALUE\"; # الحالة 0\n"
1220 "\\& ${$hashref}{\"KEY\"} = \"VALUE\"; # الحالة 1\n"
1221 "\\& ${$hashref{\"KEY\"}} = \"VALUE\"; # الحالة 2\n"
1222 "\\& ${$hashref-E<gt>{\"KEY\"}} = \"VALUE\"; # الحالة 3\n"
1223
1224 #. type: Plain text
1225 #: debian-trixie debian-unstable
1226 msgid ""
1227 "Case 2 is also deceptive in that you're accessing a variable called "
1228 "CW<%hashref>, not dereferencing through CW<$hashref> to the hash it's "
1229 "presumably referencing. That would be case 3."
1230 msgstr ""
1231 "الحالة 2 خادعة أيضًا من حيث أنك تصل إلى متغير يسمى CW<%hashref>، بدلاً من فك "
1232 "المرجعية عبر CW<$hashref> إلى الهش الذي يُفترض أنه يشير إليه. سيكون ذلك هو "
1233 "الحالة 3."
1234
1235 #. type: Plain text
1236 #: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron
1237 #: opensuse-leap-16-1 opensuse-tumbleweed
1238 msgid "I<Arrow Notation>"
1239 msgstr "I<تدوين السهم>"
1240
1241 #. type: IX
1242 #: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron
1243 #: opensuse-leap-16-1 opensuse-tumbleweed
1244 #, no-wrap
1245 msgid "Arrow Notation"
1246 msgstr "تدوين السهم"
1247
1248 #. type: Plain text
1249 #: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron
1250 #: opensuse-leap-16-1 opensuse-tumbleweed
1251 msgid ""
1252 "Subroutine calls and lookups of individual array elements arise often enough "
1253 "that it gets cumbersome to use method 2. As a form of syntactic sugar, the "
1254 "examples for method 2 may be written:"
1255 msgstr ""
1256 "تحدث استدعاءات الروتين الفرعي والبحث عن عناصر المصفوفة الفردية بشكل متكرر "
1257 "لدرجة أنه يصبح من المرهق استخدام الطريقة 2. كشكل من أشكال التجميل النحوي، "
1258 "يمكن كتابة أمثلة الطريقة 2 كما يلي:"
1259
1260 #. type: Plain text
1261 #: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron
1262 #: opensuse-leap-16-1 opensuse-tumbleweed
1263 #, no-wrap
1264 msgid ""
1265 "\\& $arrayref-E<gt>[0] = \"January\"; # Array element\n"
1266 "\\& $hashref-E<gt>{\"KEY\"} = \"VALUE\"; # Hash element\n"
1267 "\\& $coderef-E<gt>(1,2,3); # Subroutine call\n"
1268 msgstr ""
1269 "\\& $arrayref-E<gt>[0] = \"January\"; # عنصر مصفوفة\n"
1270 "\\& $hashref-E<gt>{\"KEY\"} = \"VALUE\"; # عنصر هش\n"
1271 "\\& $coderef-E<gt>(1,2,3); # استدعاء روتين فرعي\n"
1272
1273 #. type: Plain text
1274 #: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron
1275 #: opensuse-leap-16-1 opensuse-tumbleweed
1276 msgid ""
1277 "The left side of the arrow can be any expression returning a reference, "
1278 "including a previous dereference. Note that CW<$array[$x]> is I<not> the "
1279 "same thing as CW<\\*(C`$array-E<gt>[$x]\\*(C'> here:"
1280 msgstr ""
1281 "يمكن أن يكون الجانب الأيسر من السهم أي تعبير يعيد مرجعًا، بما في ذلك عملية فك "
1282 "مرجعية سابقة. لاحظ أن CW<$array[$x]> I<ليس> نفس الشيء مثل CW<\\*(C`$array-"
1283 "E<gt>[$x]\\*(C'> هنا:"
1284
1285 #. type: Plain text
1286 #: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron
1287 #: opensuse-leap-16-1 opensuse-tumbleweed
1288 #, no-wrap
1289 msgid "\\& $array[$x]-E<gt>{\"foo\"}-E<gt>[0] = \"January\";\n"
1290 msgstr "\\& $array[$x]-E<gt>{\"foo\"}-E<gt>[0] = \"January\";\n"
1291
1292 #. type: Plain text
1293 #: debian-trixie debian-unstable
1294 msgid ""
1295 "This is one of the cases we mentioned earlier in which references could "
1296 "spring into existence when in an lvalue context. Before this statement, "
1297 "CW<$array[$x]> may have been undefined. If so, it's automatically defined "
1298 "with a hash reference so that we can look up \\&CW<\\*(C`{\"foo\"}\\*(C'> in "
1299 "it. Likewise CW<\\*(C`$array[$x]-E<gt>{\"foo\"}\\*(C'> will automatically "
1300 "get defined with an array reference so that we can look up "
1301 "CW<\\*(C`[0]\\*(C'> in it. This process is called I<autovivification>."
1302 msgstr ""
1303 "هذه إحدى الحالات التي ذكرناها سابقًا حيث يمكن للمراجع أن تنبثق إلى الوجود "
1304 "عندما تكون في سياق القيمة اليسارية (lvalue). قبل هذه العبارة، قد يكون "
1305 "CW<$array[$x]> غير معرف. إذا كان الأمر كذلك، فإنه يُعرف آليًا بمرجع هش حتى "
1306 "نتمكن من البحث عن CW<\\*(C`{\"foo\"}\\*(C'> بداخله. وبالمثل، سيُعرف "
1307 "CW<\\*(C`$array[$x]-E<gt>{\"foo\"}\\*(C'> آليًا بمرجع مصفوفة حتى نتمكن من "
1308 "البحث عن CW<\\*(C`[0]\\*(C'> بداخله. تسمى هذه العملية I<التنشيط التلقائي> "
1309 "(autovivification)."
1310
1311 #. type: Plain text
1312 #: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron
1313 #: opensuse-leap-16-1 opensuse-tumbleweed
1314 msgid ""
1315 "One more thing here. The arrow is optional I<between> brackets subscripts, "
1316 "so you can shrink the above down to"
1317 msgstr ""
1318 "شيء واحد آخر هنا. السهم اختياري I<بين> المذيلات المربعة، لذا يمكنك تقليص ما "
1319 "سبق إلى"
1320
1321 #. type: Plain text
1322 #: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron
1323 #: opensuse-leap-16-1 opensuse-tumbleweed
1324 #, no-wrap
1325 msgid "\\& $array[$x]{\"foo\"}[0] = \"January\";\n"
1326 msgstr "\\& $array[$x]{\"foo\"}[0] = \"January\";\n"
1327
1328 #. type: Plain text
1329 #: debian-trixie debian-unstable
1330 msgid ""
1331 "Which, in the degenerate case of using only ordinary arrays, gives you "
1332 "multidimensional arrays just like C's:"
1333 msgstr ""
1334 "والذي، في الحالة المبسطة لاستخدام المصفوفات العادية فقط، يمنحك مصفوفات "
1335 "متعددة الأبعاد تمامًا مثل لغة C:"
1336
1337 #. type: Plain text
1338 #: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron
1339 #: opensuse-leap-16-1 opensuse-tumbleweed
1340 #, no-wrap
1341 msgid "\\& $score[$x][$y][$z] += 42;\n"
1342 msgstr "\\& $score[$x][$y][$z] += 42;\n"
1343
1344 #. type: Plain text
1345 #: debian-trixie debian-unstable
1346 msgid ""
1347 "Well, okay, not entirely like C's arrays, actually. C doesn't know how to "
1348 "grow its arrays on demand. Perl does."
1349 msgstr ""
1350 "حسنًا، ليس تمامًا مثل مصفوفات C في الواقع. لغة C لا تعرف كيف تزيد حجم "
1351 "مصفوفاتها عند الطلب، بينما تفعل لغة بيرل ذلك."
1352
1353 #. type: Plain text
1354 #: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron
1355 #: opensuse-leap-16-1 opensuse-tumbleweed
1356 msgid "I<Objects>"
1357 msgstr "I<الكائنات>"
1358
1359 #. type: IX
1360 #: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron
1361 #: opensuse-leap-16-1 opensuse-tumbleweed
1362 #, no-wrap
1363 msgid "Objects"
1364 msgstr "الكائنات"
1365
1366 #. type: Plain text
1367 #: debian-trixie debian-unstable
1368 msgid ""
1369 "If a reference happens to be a reference to an object, then there are "
1370 "probably methods to access the things referred to, and you should probably "
1371 "stick to those methods unless you're in the class package that defines the "
1372 "object's methods. In other words, be nice, and don't violate the object's "
1373 "encapsulation without a very good reason. Perl does not enforce "
1374 "encapsulation. We are not totalitarians here. We do expect some basic "
1375 "civility though."
1376 msgstr ""
1377 "إذا صادف أن المرجع هو مرجع لكائن، فمن المحتمل وجود طرق للوصول إلى الأشياء "
1378 "المشار إليها، ويجب عليك على الأرجح الالتزام بتلك الطرق ما لم تكن في حزمة "
1379 "الفئة (class) التي تحدد طرق الكائن. بعبارة أخرى، كن لطيفًا، ولا تنتهك تغليف "
1380 "(encapsulation) الكائن دون سبب وجيه للغاية. لغة بيرل لا تفرض التغليف، فنحن "
1381 "لسنا شموليين هنا، لكننا نتوقع بعض الكياسة الأساسية."
1382
1383 #. type: Plain text
1384 #: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron
1385 #: opensuse-leap-16-1 opensuse-tumbleweed
1386 msgid "I<Miscellaneous Usage>"
1387 msgstr "I<استخدامات متنوعة>"
1388
1389 #. type: IX
1390 #: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron
1391 #: opensuse-leap-16-1 opensuse-tumbleweed
1392 #, no-wrap
1393 msgid "Miscellaneous Usage"
1394 msgstr "استخدامات متنوعة"
1395
1396 #. type: Plain text
1397 #: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron
1398 #: opensuse-leap-16-1 opensuse-tumbleweed
1399 msgid ""
1400 "Using a string or number as a reference produces a symbolic reference, as "
1401 "explained above. Using a reference as a number produces an integer "
1402 "representing its storage location in memory. The only useful thing to be "
1403 "done with this is to compare two references numerically to see whether they "
1404 "refer to the same location."
1405 msgstr ""
1406 "استخدام سلسلة نصية أو رقم كمرجع ينتج مرجعًا رمزيًا، كما هو موضح أعلاه. استخدام "
1407 "المرجع كرقم ينتج عددًا صحيحًا يمثل موقع تخزينه في الذاكرة. الشيء المفيد الوحيد "
1408 "الذي يمكن فعله بهذا هو مقارنة مرجعين عدديًا لمعرفة ما إذا كانا يشيران إلى نفس "
1409 "الموقع."
1410
1411 #. type: IX
1412 #: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron
1413 #: opensuse-leap-16-1 opensuse-tumbleweed
1414 #, no-wrap
1415 msgid "reference, numeric context"
1416 msgstr "مرجع، سياق عددي"
1417
1418 #. type: Plain text
1419 #: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron
1420 #: opensuse-leap-16-1 opensuse-tumbleweed
1421 #, no-wrap
1422 msgid ""
1423 "\\& if ($ref1 == $ref2) { # cheap numeric compare of references\n"
1424 "\\& print \"refs 1 and 2 refer to the same thing\\en\";\n"
1425 "\\& }\n"
1426 msgstr ""
1427 "\\& if ($ref1 == $ref2) { # مقارنة عددية بسيطة للمراجع\n"
1428 "\\& print \"المرجعان 1 و 2 يشيران إلى نفس الشيء\\en\";\n"
1429 "\\& }\n"
1430
1431 #. type: Plain text
1432 #: debian-trixie debian-unstable
1433 msgid ""
1434 "Using a reference as a string produces both its referent's type, including "
1435 "any package blessing as described in perlobj, as well as the numeric address "
1436 "expressed in hex. The B<ref()> operator returns just the type of thing the "
1437 "reference is pointing to, without the address. See \"ref\" in perlfunc for "
1438 "details and examples of its use."
1439 msgstr ""
1440 "استخدام المرجع كسلسلة نصية ينتج نوع المشار إليه، بما في ذلك أي بركة "
1441 "(blessing) للحزمة كما هو موضح في perlobj، بالإضافة إلى العنوان العددي المعبر "
1442 "عنه بنظام ست عشري. يعيد المعامل B<ref()> نوع الشيء الذي يشير إليه المرجع "
1443 "فقط، دون العنوان. انظر \"ref\" في perlfunc لمزيد من التفاصيل وأمثلة على "
1444 "استخدامه."
1445
1446 #. type: IX
1447 #: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron
1448 #: opensuse-leap-16-1 opensuse-tumbleweed
1449 #, no-wrap
1450 msgid "reference, string context"
1451 msgstr "مرجع، سياق نصي"
1452
1453 #. type: Plain text
1454 #: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron
1455 #: opensuse-leap-16-1 opensuse-tumbleweed
1456 msgid ""
1457 "The B<bless()> operator may be used to associate the object a reference "
1458 "points to with a package functioning as an object class. See perlobj."
1459 msgstr ""
1460 "يمكن استخدام معامل B<bless()> لربط الكائن الذي يشير إليه المرجع بحزمة تعمل "
1461 "كفئة (class) كائن. انظر perlobj."
1462
1463 #. type: Plain text
1464 #: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron
1465 #: opensuse-leap-16-1 opensuse-tumbleweed
1466 msgid ""
1467 "A typeglob may be dereferenced the same way a reference can, because the "
1468 "dereference syntax always indicates the type of reference desired. So "
1469 "CW<\\*(C`${*foo}\\*(C'> and CW<\\*(C`${\\e$foo}\\*(C'> both indicate the "
1470 "same scalar variable."
1471 msgstr ""
1472 "يمكن فك مرجعية typeglob بنفس الطريقة التي يفك بها المرجع، لأن بنية فك "
1473 "المرجعية تشير دائمًا إلى نوع المرجع المطلوب. لذا فإن CW<\\*(C`${*foo}\\*(C'> "
1474 "و CW<\\*(C`${\\e$foo}\\*(C'> كلاهما يشيران إلى نفس المتغير السلمي (scalar)."
1475
1476 #. type: Plain text
1477 #: debian-trixie debian-unstable
1478 msgid "Here's a trick for interpolating a subroutine call into a string:"
1479 msgstr "إليك خدعة لإقحام استدعاء روتين فرعي داخل سلسلة نصية:"
1480
1481 #. type: Plain text
1482 #: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron
1483 #: opensuse-leap-16-1 opensuse-tumbleweed
1484 #, no-wrap
1485 msgid "\\& print \"My sub returned @{[mysub(1,2,3)]} that time.\\en\";\n"
1486 msgstr "\\& print \"أعاد الروتين الفرعي @{[mysub(1,2,3)]} تلك المرة.\\en\";\n"
1487
1488 #. type: Plain text
1489 #: debian-trixie debian-unstable
1490 msgid ""
1491 "The way it works is that when the CW<\\*(C`@{...}\\*(C'> is seen in the "
1492 "double-quoted string, it's evaluated as a block. The block creates a "
1493 "reference to an anonymous array containing the results of the call to "
1494 "CW<\\*(C`mysub(1,2,3)\\*(C'>. So the whole block returns a reference to an "
1495 "array, which is then dereferenced by CW<\\*(C`@{...}\\*(C'> and stuck into "
1496 "the double-quoted string. This chicanery is also useful for arbitrary "
1497 "expressions:"
1498 msgstr ""
1499 "طريقة عملها هي أنه عندما تظهر CW<\\*(C`@{...}\\*(C'> في سلسلة نصية بين "
1500 "علامتي اقتباس مزدوجتين، يتم تقييمها ككتلة (block). تنشئ الكتلة مرجعًا لمصفوفة "
1501 "مجهولة تحتوي على نتائج استدعاء CW<\\*(C`mysub(1,2,3)\\*(C'>. وبذلك تعيد "
1502 "الكتلة بأكملها مرجعًا إلى مصفوفة، ثم يتم فك مرجعيتها بواسطة "
1503 "CW<\\*(C`@{...}\\*(C'> وإقحامها في السلسلة النصية. هذه المناورة مفيدة أيضًا "
1504 "للتعبيرات الاختيارية:"
1505
1506 #. type: Plain text
1507 #: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron
1508 #: opensuse-leap-16-1 opensuse-tumbleweed
1509 #, no-wrap
1510 msgid "\\& print \"That yields @{[$n + 5]} widgets\\en\";\n"
1511 msgstr "\\& print \"ينتج عن ذلك @{[$n + 5]} من الأدوات\\en\";\n"
1512
1513 #. type: Plain text
1514 #: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron
1515 #: opensuse-leap-16-1 opensuse-tumbleweed
1516 msgid ""
1517 "Similarly, an expression that returns a reference to a scalar can be "
1518 "dereferenced via CW<\\*(C`${...}\\*(C'>. Thus, the above expression may be "
1519 "written as:"
1520 msgstr ""
1521 "وبالمثل، يمكن فك مرجعية تعبير يعيد مرجعًا إلى متغير سلمي (scalar) عبر "
1522 "CW<\\*(C`${...}\\*(C'>. وبالتالي، يمكن كتابة التعبير أعلاه كما يلي:"
1523
1524 #. type: Plain text
1525 #: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron
1526 #: opensuse-leap-16-1 opensuse-tumbleweed
1527 #, no-wrap
1528 msgid "\\& print \"That yields ${\\e($n + 5)} widgets\\en\";\n"
1529 msgstr "\\& print \"ينتج عن ذلك ${\\e($n + 5)} من الأدوات\\en\";\n"
1530
1531 #. type: IX
1532 #: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron
1533 #: opensuse-leap-16-1 opensuse-tumbleweed
1534 #, no-wrap
1535 msgid "Circular References"
1536 msgstr "مراجع دائرية"
1537
1538 #. type: IX
1539 #: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron
1540 #: opensuse-leap-16-1 opensuse-tumbleweed
1541 #, no-wrap
1542 msgid "circular reference reference, circular"
1543 msgstr "مرجع دائري، مرجع دائري"
1544
1545 #. type: Plain text
1546 #: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron
1547 #: opensuse-leap-16-1 opensuse-tumbleweed
1548 msgid ""
1549 "It is possible to create a \"circular reference\" in Perl, which can lead to "
1550 "memory leaks. A circular reference occurs when two references contain a "
1551 "reference to each other, like this:"
1552 msgstr ""
1553 "من الممكن إنشاء \"مرجع دائري\" في بيرل، مما قد يؤدي إلى تسرب في الذاكرة. "
1554 "يحدث المرجع الدائري عندما يحتوي مرجعان على مرجع لبعضهما البعض، على هذا النحو:"
1555
1556 #. type: Plain text
1557 #: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron
1558 #: opensuse-leap-16-1 opensuse-tumbleweed
1559 #, no-wrap
1560 msgid ""
1561 "\\& my $foo = {};\n"
1562 "\\& my $bar = { foo =E<gt> $foo };\n"
1563 "\\& $foo-E<gt>{bar} = $bar;\n"
1564 msgstr ""
1565 "\\& my $foo = {};\n"
1566 "\\& my $bar = { foo =E<gt> $foo };\n"
1567 "\\& $foo-E<gt>{bar} = $bar;\n"
1568
1569 #. type: Plain text
1570 #: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron
1571 #: opensuse-leap-16-1 opensuse-tumbleweed
1572 msgid "You can also create a circular reference with a single variable:"
1573 msgstr "يمكنك أيضًا إنشاء مرجع دائري باستخدام متغير واحد:"
1574
1575 #. type: Plain text
1576 #: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron
1577 #: opensuse-leap-16-1 opensuse-tumbleweed
1578 #, no-wrap
1579 msgid ""
1580 "\\& my $foo;\n"
1581 "\\& $foo = \\e$foo;\n"
1582 msgstr ""
1583 "\\& my $foo;\n"
1584 "\\& $foo = \\e$foo;\n"
1585
1586 #. type: Plain text
1587 #: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron
1588 #: opensuse-leap-16-1 opensuse-tumbleweed
1589 msgid ""
1590 "In this case, the reference count for the variables will never reach 0, and "
1591 "the references will never be garbage-collected. This can lead to memory "
1592 "leaks."
1593 msgstr ""
1594 "في هذه الحالة، لن يصل عدد المراجع للمتغيرات أبدًا إلى 0، ولن تُجمع المراجع "
1595 "أبدًا بواسطة جامع القمامة (garbage collector). يمكن أن يؤدي هذا إلى تسرب في "
1596 "الذاكرة."
1597
1598 #. type: Plain text
1599 #: debian-trixie debian-unstable
1600 msgid ""
1601 "Because objects in Perl are implemented as references, it's possible to have "
1602 "circular references with objects as well. Imagine a TreeNode class where "
1603 "each node references its parent and child nodes. Any node with a parent will "
1604 "be part of a circular reference."
1605 msgstr ""
1606 "نظرًا لأن الكائنات في بيرل تُنفذ كمراجع، فمن الممكن وجود مراجع دائرية مع "
1607 "الكائنات أيضًا. تخيل فئة TreeNode حيث يشير كل عقدة إلى عقدها الأب والأبناء. "
1608 "أي عقدة لها أب ستكون جزءًا من مرجع دائري."
1609
1610 #. type: Plain text
1611 #: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron
1612 #: opensuse-leap-16-1 opensuse-tumbleweed
1613 msgid ""
1614 "You can break circular references by creating a \"weak reference\". A weak "
1615 "reference does not increment the reference count for a variable, which means "
1616 "that the object can go out of scope and be destroyed. You can weaken a "
1617 "reference with the CW<\\*(C`weaken\\*(C'> function exported by the Scalar::"
1618 "Util module, or available as CW<\\*(C`builtin::weaken\\*(C'> directly in "
1619 "Perl version 5.35.7 or later."
1620 msgstr ""
1621 "يمكنك كسر المراجع الدائرية عن طريق إنشاء \"مرجع ضعيف\". المرجع الضعيف لا "
1622 "يزيد عدد المراجع للمتغير، مما يعني أن الكائن يمكن أن يخرج عن النطاق ويتم "
1623 "تدميره. يمكنك إضعاف مرجع باستخدام وظيفة CW<\\*(C`weaken\\*(C'> المصدرة "
1624 "بواسطة وحدة Scalar::Util، أو المتوفرة كـ CW<\\*(C`builtin::weaken\\*(C'> "
1625 "مباشرة في إصدار بيرل 5.35.7 أو أحدث."
1626
1627 #. type: Plain text
1628 #: debian-trixie debian-unstable
1629 msgid "Here's how we can make the first example safer:"
1630 msgstr "إليك كيف يمكننا جعل المثال الأول أكثر أمانًا:"
1631
1632 #. type: Plain text
1633 #: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron
1634 #: opensuse-leap-16-1 opensuse-tumbleweed
1635 #, no-wrap
1636 msgid ""
1637 "\\& use Scalar::Util \\*(Aqweaken\\*(Aq;\n"
1638 "\\&\n"
1639 "\\& my $foo = {};\n"
1640 "\\& my $bar = { foo =E<gt> $foo };\n"
1641 "\\& $foo-E<gt>{bar} = $bar;\n"
1642 "\\&\n"
1643 "\\& weaken $foo-E<gt>{bar};\n"
1644 msgstr ""
1645 "\\& use Scalar::Util \\*(Aqweaken\\*(Aq;\n"
1646 "\\&\n"
1647 "\\& my $foo = {};\n"
1648 "\\& my $bar = { foo =E<gt> $foo };\n"
1649 "\\& $foo-E<gt>{bar} = $bar;\n"
1650 "\\&\n"
1651 "\\& weaken $foo-E<gt>{bar};\n"
1652
1653 #. type: Plain text
1654 #: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron
1655 #: opensuse-leap-16-1 opensuse-tumbleweed
1656 msgid ""
1657 "The reference from CW<$foo> to CW<$bar> has been weakened. When the "
1658 "\\&CW<$bar> variable goes out of scope, it will be garbage-collected. The "
1659 "next time you look at the value of the CW<\\*(C`$foo-E<gt>{bar}\\*(C'> key, "
1660 "it will be CW<\\*(C`undef\\*(C'>."
1661 msgstr ""
1662 "أُضعف المرجع من CW<$foo> إلى CW<$bar>. عندما يخرج المتغير CW<$bar> عن النطاق، "
1663 "سيُجمع بواسطة جامع القمامة. في المرة القادمة التي تنظر فيها إلى قيمة مفتاح "
1664 "CW<\\*(C`$foo-E<gt>{bar}\\*(C'>، ستكون CW<\\*(C`undef\\*(C'>."
1665
1666 #. type: Plain text
1667 #: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron
1668 #: opensuse-leap-16-1 opensuse-tumbleweed
1669 msgid ""
1670 "This action at a distance can be confusing, so you should be careful with "
1671 "your use of weaken. You should weaken the reference in the variable that "
1672 "will go out of scope I<first>. That way, the longer-lived variable will "
1673 "contain the expected reference until it goes out of scope."
1674 msgstr ""
1675 "يمكن أن يكون هذا الفعل عن بُعد مربكًا، لذا يجب أن تكون حذرًا في استخدامك لـ "
1676 "weaken. يجب عليك إضعاف المرجع في المتغير الذي سيخرج عن النطاق I<أولاً>. وبهذه "
1677 "الطريقة، سيحتوي المتغير الأطول عمرًا على المرجع المتوقع حتى يخرج هو عن النطاق."
1678
1679 #. type: IX
1680 #: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron
1681 #: opensuse-leap-16-1 opensuse-tumbleweed
1682 #, no-wrap
1683 msgid "Symbolic references"
1684 msgstr "مراجع رمزية"
1685
1686 #. type: Plain text
1687 #: debian-trixie debian-unstable
1688 msgid ""
1689 "We said that references spring into existence as necessary if they are "
1690 "undefined, but we didn't say what happens if a value used as a reference is "
1691 "already defined, but I<isn't> a hard reference. If you use it as a "
1692 "reference, it'll be treated as a symbolic reference. That is, the value of "
1693 "the scalar is taken to be the I<name> of a variable, rather than a direct "
1694 "link to a (possibly) anonymous value."
1695 msgstr ""
1696 "قلنا إن المراجع تنبثق إلى الوجود حسب الضرورة إذا كانت غير معرفة، لكننا لم "
1697 "نقل ما يحدث إذا كانت القيمة المستخدمة كمرجع معرفة بالفعل، ولكنها I<ليست> "
1698 "مرجعًا صلبًا (hard reference). إذا استخدمتها كمرجع، فسيتم التعامل معها كمرجع "
1699 "رمزي. أي أن قيمة المتغير السلمي تُعتبر I<اسم> متغير، بدلاً من كونها رابطًا "
1700 "مباشرًا لقيمة مجهولة (ربما)."
1701
1702 #. type: Plain text
1703 #: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron
1704 #: opensuse-leap-16-1 opensuse-tumbleweed
1705 msgid "People frequently expect it to work like this. So it does."
1706 msgstr "كثيرًا ما يتوقع الناس أن تعمل بهذه الطريقة. وهي كذلك بالفعل."
1707
1708 #. type: Plain text
1709 #: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron
1710 #: opensuse-leap-16-1 opensuse-tumbleweed
1711 #, no-wrap
1712 msgid ""
1713 "\\& $name = \"foo\";\n"
1714 "\\& $$name = 1; # Sets $foo\n"
1715 "\\& ${$name} = 2; # Sets $foo\n"
1716 "\\& ${$name x 2} = 3; # Sets $foofoo\n"
1717 "\\& $name-E<gt>[0] = 4; # Sets $foo[0]\n"
1718 "\\& @$name = (); # Clears @foo\n"
1719 "\\& &$name(); # Calls &foo()\n"
1720 "\\& $pack = \"THAT\";\n"
1721 "\\& ${\"${pack}::$name\"} = 5; # Sets $THAT::foo without eval\n"
1722 msgstr ""
1723 "\\& $name = \"foo\";\n"
1724 "\\& $$name = 1; # يضبط $foo\n"
1725 "\\& ${$name} = 2; # يضبط $foo\n"
1726 "\\& ${$name x 2} = 3; # يضبط $foofoo\n"
1727 "\\& $name-E<gt>[0] = 4; # يضبط $foo[0]\n"
1728 "\\& @$name = (); # يمسح @foo\n"
1729 "\\& &$name(); # يستدعي &foo()\n"
1730 "\\& $pack = \"THAT\";\n"
1731 "\\& ${\"${pack}::$name\"} = 5; # يضبط $THAT::foo بدون eval\n"
1732
1733 #. type: Plain text
1734 #: debian-trixie debian-unstable
1735 msgid ""
1736 "This is powerful, and slightly dangerous, in that it's possible to intend "
1737 "(with the utmost sincerity) to use a hard reference, and accidentally use a "
1738 "symbolic reference instead. To protect against that, you can say"
1739 msgstr ""
1740 "هذا أمر قوي، وخطير قليلاً، من حيث أنه من الممكن أن تنوي (بمنتهى الصدق) "
1741 "استخدام مرجع صلب، وتستخدم بالخطأ مرجعًا رمزيًا بدلاً منه. للحماية من ذلك، يمكنك "
1742 "قول"
1743
1744 #. type: Plain text
1745 #: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron
1746 #: opensuse-leap-16-1 opensuse-tumbleweed
1747 #, no-wrap
1748 msgid "\\& use strict \\*(Aqrefs\\*(Aq;\n"
1749 msgstr "\\& use strict \\*(Aqrefs\\*(Aq;\n"
1750
1751 #. type: Plain text
1752 #: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron
1753 #: opensuse-leap-16-1 opensuse-tumbleweed
1754 msgid ""
1755 "and then only hard references will be allowed for the rest of the enclosing "
1756 "block. An inner block may countermand that with"
1757 msgstr ""
1758 "وبعد ذلك لن يُسمح إلا بالمراجع الصلبة فيما تبقى من الكتلة المحيطة. ويمكن "
1759 "لكتلة داخلية أن تلغي ذلك بـ"
1760
1761 #. type: Plain text
1762 #: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron
1763 #: opensuse-leap-16-1 opensuse-tumbleweed
1764 #, no-wrap
1765 msgid "\\& no strict \\*(Aqrefs\\*(Aq;\n"
1766 msgstr "\\& no strict \\*(Aqrefs\\*(Aq;\n"
1767
1768 #. type: Plain text
1769 #: debian-trixie debian-unstable
1770 msgid ""
1771 "Only package variables (globals, even if localized) are visible to symbolic "
1772 "references. Lexical variables (declared with B<my()>) aren't in a symbol "
1773 "table, and thus are invisible to this mechanism. For example:"
1774 msgstr ""
1775 "متغيرات الحزمة فقط (العالمية، حتى لو كانت محلية) هي المرئية للمراجع الرمزية. "
1776 "المتغيرات اللفظية (المصرح عنها بـ B<my()>) ليست في جدول رموز، وبالتالي فهي "
1777 "غير مرئية لهذه الآلية. على سبيل المثال:"
1778
1779 #. type: Plain text
1780 #: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron
1781 #: opensuse-leap-16-1 opensuse-tumbleweed
1782 #, no-wrap
1783 msgid ""
1784 "\\& local $value = 10;\n"
1785 "\\& $ref = \"value\";\n"
1786 "\\& {\n"
1787 "\\& my $value = 20;\n"
1788 "\\& print $$ref;\n"
1789 "\\& }\n"
1790 msgstr ""
1791 "\\& local $value = 10;\n"
1792 "\\& $ref = \"value\";\n"
1793 "\\& {\n"
1794 "\\& my $value = 20;\n"
1795 "\\& print $$ref;\n"
1796 "\\& }\n"
1797
1798 #. type: Plain text
1799 #: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron
1800 #: opensuse-leap-16-1 opensuse-tumbleweed
1801 msgid ""
1802 "This will still print 10, not 20. Remember that B<local()> affects package "
1803 "variables, which are all \"global\" to the package."
1804 msgstr ""
1805 "سيظل هذا يطبع 10، وليس 20. تذكر أن B<local()> تؤثر على متغيرات الحزمة، والتي "
1806 "تكون جميعها \"عالمية\" بالنسبة للحزمة."
1807
1808 #. type: IX
1809 #: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron
1810 #: opensuse-leap-16-1 opensuse-tumbleweed
1811 #, no-wrap
1812 msgid "Not-so-symbolic references"
1813 msgstr "مراجع ليست رمزية تمامًا"
1814
1815 #. type: Plain text
1816 #: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron
1817 #: opensuse-leap-16-1 opensuse-tumbleweed
1818 msgid ""
1819 "Brackets around a symbolic reference can simply serve to isolate an "
1820 "identifier or variable name from the rest of an expression, just as they "
1821 "always have within a string. For example,"
1822 msgstr ""
1823 "يمكن للأقواس حول المرجع الرمزي أن تعمل ببساطة على عزل معرف أو اسم متغير عن "
1824 "بقية التعبير، تمامًا كما كانت تفعل دائمًا داخل السلسلة النصية. على سبيل المثال،"
1825
1826 #. type: Plain text
1827 #: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron
1828 #: opensuse-leap-16-1 opensuse-tumbleweed
1829 #, no-wrap
1830 msgid ""
1831 "\\& $push = \"pop on \";\n"
1832 "\\& print \"${push}over\";\n"
1833 msgstr ""
1834 "\\& $push = \"pop on \";\n"
1835 "\\& print \"${push}over\";\n"
1836
1837 #. type: Plain text
1838 #: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron
1839 #: opensuse-leap-16-1 opensuse-tumbleweed
1840 msgid ""
1841 "has always meant to print \"pop on over\", even though push is a reserved "
1842 "word. This is generalized to work the same without the enclosing double "
1843 "quotes, so that"
1844 msgstr ""
1845 "كانت تعني دائمًا طباعة \"pop on over\"، على الرغم من أن push كلمة محجوزة. تم "
1846 "تعميم هذا ليعمل بنفس الطريقة بدون علامات الاقتباس المزدوجة المحيطة، بحيث أن"
1847
1848 #. type: Plain text
1849 #: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron
1850 #: opensuse-leap-16-1 opensuse-tumbleweed
1851 #, no-wrap
1852 msgid "\\& print ${push} . \"over\";\n"
1853 msgstr "\\& print ${push} . \"over\";\n"
1854
1855 #. type: Plain text
1856 #: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron
1857 #: opensuse-leap-16-1 opensuse-tumbleweed
1858 msgid "and even"
1859 msgstr "وحتى"
1860
1861 #. type: Plain text
1862 #: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron
1863 #: opensuse-leap-16-1 opensuse-tumbleweed
1864 #, no-wrap
1865 msgid "\\& print ${ push } . \"over\";\n"
1866 msgstr "\\& print ${ push } . \"over\";\n"
1867
1868 #. type: Plain text
1869 #: debian-trixie debian-unstable
1870 msgid ""
1871 "will have the same effect. This construct is I<not> considered to be a "
1872 "symbolic reference when you're using strict refs:"
1873 msgstr ""
1874 "سيكون له نفس التأثير. هذا البناء I<لا> يعتبر مرجعًا رمزيًا عندما تستخدم strict "
1875 "refs:"
1876
1877 #. type: Plain text
1878 #: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron
1879 #: opensuse-leap-16-1 opensuse-tumbleweed
1880 #, no-wrap
1881 msgid ""
1882 "\\& use strict \\*(Aqrefs\\*(Aq;\n"
1883 "\\& ${ bareword }; # Okay, means $bareword.\n"
1884 "\\& ${ \"bareword\" }; # Error, symbolic reference.\n"
1885 msgstr ""
1886 "\\& use strict \\*(Aqrefs\\*(Aq;\n"
1887 "\\& ${ bareword }; # حسنًا، تعني $bareword.\n"
1888 "\\& ${ \"bareword\" }; # خطأ، مرجع رمزي.\n"
1889
1890 #. type: Plain text
1891 #: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron
1892 #: opensuse-leap-16-1 opensuse-tumbleweed
1893 msgid ""
1894 "Similarly, because of all the subscripting that is done using single words, "
1895 "the same rule applies to any bareword that is used for subscripting a hash. "
1896 "So now, instead of writing"
1897 msgstr ""
1898 "وبالمثل، نظرًا لكل عمليات التذييل (subscripting) التي تتم باستخدام كلمات "
1899 "مفردة، تنطبق نفس القاعدة على أي كلمة مجردة (bareword) تُستخدم لتذييل الهش. "
1900 "لذا الآن، بدلاً من كتابة"
1901
1902 #. type: Plain text
1903 #: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron
1904 #: opensuse-leap-16-1 opensuse-tumbleweed
1905 #, no-wrap
1906 msgid "\\& $hash{ \"aaa\" }{ \"bbb\" }{ \"ccc\" }\n"
1907 msgstr "\\& $hash{ \"aaa\" }{ \"bbb\" }{ \"ccc\" }\n"
1908
1909 #. type: Plain text
1910 #: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron
1911 #: opensuse-leap-16-1 opensuse-tumbleweed
1912 msgid "you can write just"
1913 msgstr "يمكنك كتابة فقط"
1914
1915 #. type: Plain text
1916 #: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron
1917 #: opensuse-leap-16-1 opensuse-tumbleweed
1918 #, no-wrap
1919 msgid "\\& $hash{ aaa }{ bbb }{ ccc }\n"
1920 msgstr "\\& $hash{ aaa }{ bbb }{ ccc }\n"
1921
1922 #. type: Plain text
1923 #: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron
1924 #: opensuse-leap-16-1 opensuse-tumbleweed
1925 msgid ""
1926 "and not worry about whether the subscripts are reserved words. In the rare "
1927 "event that you do wish to do something like"
1928 msgstr ""
1929 "ولا تقلق بشأن ما إذا كانت المذيلات كلمات محجوزة. في الحالة النادرة التي ترغب "
1930 "فيها فعلاً في القيام بشيء مثل"
1931
1932 #. type: Plain text
1933 #: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron
1934 #: opensuse-leap-16-1 opensuse-tumbleweed
1935 #, no-wrap
1936 msgid "\\& $hash{ shift }\n"
1937 msgstr "\\& $hash{ shift }\n"
1938
1939 #. type: Plain text
1940 #: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron
1941 #: opensuse-leap-16-1 opensuse-tumbleweed
1942 msgid ""
1943 "you can force interpretation as a reserved word by adding anything that "
1944 "makes it more than a bareword:"
1945 msgstr ""
1946 "يمكنك فرض التفسير ككلمة محجوزة بإضافة أي شيء يجعلها أكثر من كلمة مجردة:"
1947
1948 #. type: Plain text
1949 #: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron
1950 #: opensuse-leap-16-1 opensuse-tumbleweed
1951 #, no-wrap
1952 msgid ""
1953 "\\& $hash{ shift() }\n"
1954 "\\& $hash{ +shift }\n"
1955 "\\& $hash{ shift @_ }\n"
1956 msgstr ""
1957 "\\& $hash{ shift() }\n"
1958 "\\& $hash{ +shift }\n"
1959 "\\& $hash{ shift @_ }\n"
1960
1961 #. type: Plain text
1962 #: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron
1963 #: opensuse-leap-16-1 opensuse-tumbleweed
1964 msgid ""
1965 "The CW<\\*(C`use warnings\\*(C'> pragma or the B<-w> switch will warn you if "
1966 "it interprets a reserved word as a string. But it will no longer warn you "
1967 "about using lowercase words, because the string is effectively quoted."
1968 msgstr ""
1969 "سيقوم pragma الاستخدام CW<\\*(C`use warnings\\*(C'> أو مفتاح B<-w> بتحذيرك "
1970 "إذا فسر كلمة محجوزة كسلسلة نصية. لكنه لن يحذرك بعد الآن بشأن استخدام كلمات "
1971 "صغيرة، لأن السلسلة تكون مقتبسة فعليًا."
1972
1973 #. type: IX
1974 #: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron
1975 #: opensuse-leap-16-1 opensuse-tumbleweed
1976 #, no-wrap
1977 msgid "Pseudo-hashes: Using an array as a hash"
1978 msgstr "أشباه الهش: استخدام مصفوفة كهش"
1979
1980 #. type: IX
1981 #: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron
1982 #: opensuse-leap-16-1 opensuse-tumbleweed
1983 #, no-wrap
1984 msgid "pseudo-hash pseudo hash pseudohash"
1985 msgstr "أشباه الهش، شبه هش، شبه هش"
1986
1987 #. type: Plain text
1988 #: debian-trixie debian-unstable
1989 msgid ""
1990 "Pseudo-hashes have been removed from Perl. The 'fields' pragma remains "
1991 "available."
1992 msgstr "أُزيلت أشباه الهش من بيرل. لا يزال pragma 'fields' متاحًا."
1993
1994 #. type: IX
1995 #: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron
1996 #: opensuse-leap-16-1 opensuse-tumbleweed
1997 #, no-wrap
1998 msgid "Function Templates"
1999 msgstr "قوالب الدوال"
2000
2001 #. type: IX
2002 #: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron
2003 #: opensuse-leap-16-1 opensuse-tumbleweed
2004 #, no-wrap
2005 msgid "scope, lexical closure lexical lexical scope subroutine, nested sub, nested subroutine, local sub, local"
2006 msgstr "نطاق، إغلاق لفظي لفظي نطاق لفظي روتين فرعي، روتين فرعي متداخل، روتين فرعي متداخل، روتين فرعي محلي، روتين فرعي محلي"
2007
2008 #. type: Plain text
2009 #: debian-trixie debian-unstable
2010 msgid ""
2011 "As explained above, an anonymous function with access to the lexical "
2012 "variables visible when that function was compiled, creates a closure. It "
2013 "retains access to those variables even though it doesn't get run until "
2014 "later, such as in a signal handler or a Tk callback."
2015 msgstr ""
2016 "كما هو موضح أعلاه، فإن الدالة المجهولة التي لها حق الوصول إلى المتغيرات "
2017 "اللفظية المرئية عند تجميع تلك الدالة، تنشئ إغلاقًا (closure). وهي تحتفظ "
2018 "بالوصول إلى تلك المتغيرات حتى لو لم يتم تشغيلها إلا لاحقًا، كما هو الحال في "
2019 "معالج الإشارات أو رد نداء Tk."
2020
2021 #. type: Plain text
2022 #: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron
2023 #: opensuse-leap-16-1 opensuse-tumbleweed
2024 msgid ""
2025 "Using a closure as a function template allows us to generate many functions "
2026 "that act similarly. Suppose you wanted functions named after the colors "
2027 "that generated HTML font changes for the various colors:"
2028 msgstr ""
2029 "يسمح لنا استخدام الإغلاق كقالب دالة بتوليد العديد من الدوال التي تعمل بشكل "
2030 "متشابه. لنفترض أنك أردت دوالاً مسماة بأسماء الألوان تقوم بتوليد تغييرات خطوط "
2031 "HTML لمختلف الألوان:"
2032
2033 #. type: Plain text
2034 #: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron
2035 #: opensuse-leap-16-1 opensuse-tumbleweed
2036 #, no-wrap
2037 msgid "\\& print \"Be \", red(\"careful\"), \"with that \", green(\"light\");\n"
2038 msgstr "\\& print \"Be \", red(\"careful\"), \"with that \", green(\"light\");\n"
2039
2040 #. type: Plain text
2041 #: debian-trixie debian-unstable
2042 msgid ""
2043 "The B<red()> and B<green()> functions would be similar. To create these, "
2044 "we'll assign a closure to a typeglob of the name of the function we're "
2045 "trying to build."
2046 msgstr ""
2047 "ستكون دالتا B<red()> و B<green()> متشابهتين. لإنشاء هذه، سنقوم بتعيين إغلاق "
2048 "لـ typeglob باسم الدالة التي نحاول بناءها."
2049
2050 #. type: Plain text
2051 #: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron
2052 #: opensuse-leap-16-1 opensuse-tumbleweed
2053 #, no-wrap
2054 msgid ""
2055 "\\& @colors = qw(red blue green yellow orange purple violet);\n"
2056 "\\& for my $name (@colors) {\n"
2057 "\\& no strict \\*(Aqrefs\\*(Aq; # allow symbol table manipulation\n"
2058 "\\& *$name = *{uc $name} = sub { \"E<lt>FONT COLOR=\\*(Aq$name\\*(AqE<gt>@_E<lt>/FONTE<gt>\" };\n"
2059 "\\& }\n"
2060 msgstr ""
2061 "\\& @colors = qw(red blue green yellow orange purple violet);\n"
2062 "\\& for my $name (@colors) {\n"
2063 "\\& no strict \\*(Aqrefs\\*(Aq; # السماح بالتلاعب بجدول الرموز\n"
2064 "\\& *$name = *{uc $name} = sub { \"E<lt>FONT COLOR=\\*(Aq$name\\*(AqE<gt>@_E<lt>/FONTE<gt>\" };\n"
2065 "\\& }\n"
2066
2067 #. type: Plain text
2068 #: debian-trixie debian-unstable
2069 msgid ""
2070 "Now all those different functions appear to exist independently. You can "
2071 "call B<red()>, B<RED()>, B<blue()>, B<BLUE()>, B<green()>, etc. This "
2072 "technique saves on both compile time and memory use, and is less error-prone "
2073 "as well, since syntax checks happen at compile time. It's critical that any "
2074 "variables in the anonymous subroutine be lexicals in order to create a "
2075 "proper closure. That's the reasons for the CW<\\*(C`my\\*(C'> on the loop "
2076 "iteration variable."
2077 msgstr ""
2078 "الآن تبدو كل تلك الدوال المختلفة موجودة بشكل مستقل. يمكنك استدعاء B<red()> و "
2079 "B<RED()> و B<blue()> و B<BLUE()> و B<green()> وما إلى ذلك. توفر هذه التقنية "
2080 "كلاً من وقت التجميع واستخدام الذاكرة، وهي أقل عرضة للخطأ أيضًا، لأن فحص البنية "
2081 "يتم في وقت التجميع. من الضروري أن تكون أي متغيرات في الروتين الفرعي المجهول "
2082 "لفظية (lexicals) من أجل إنشاء إغلاق سليم. وهذا هو سبب وجود "
2083 "CW<\\*(C`my\\*(C'> على متغير تكرار الحلقة."
2084
2085 #. type: Plain text
2086 #: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron
2087 #: opensuse-leap-16-1 opensuse-tumbleweed
2088 msgid ""
2089 "This is one of the only places where giving a prototype to a closure makes "
2090 "much sense. If you wanted to impose scalar context on the arguments of "
2091 "these functions (probably not a wise idea for this particular example), you "
2092 "could have written it this way instead:"
2093 msgstr ""
2094 "هذا أحد الأماكن القليلة التي يكون فيها إعطاء نموذج مبدئي (prototype) للإغلاق "
2095 "منطقيًا. إذا أردت فرض سياق سلمي (scalar context) على وسائط هذه الدوال (ربما "
2096 "ليست فكرة حكيمة لهذا المثال بالذات)، كان بإمكانك كتابتها بهذه الطريقة بدلاً "
2097 "من ذلك:"
2098
2099 #. type: Plain text
2100 #: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron
2101 #: opensuse-leap-16-1 opensuse-tumbleweed
2102 #, no-wrap
2103 msgid "\\& *$name = sub ($) { \"E<lt>FONT COLOR=\\*(Aq$name\\*(AqE<gt>$_[0]E<lt>/FONTE<gt>\" };\n"
2104 msgstr "\\& *$name = sub ($) { \"E<lt>FONT COLOR=\\*(Aq$name\\*(AqE<gt>$_[0]E<lt>/FONTE<gt>\" };\n"
2105
2106 #. type: Plain text
2107 #: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron
2108 #: opensuse-leap-16-1 opensuse-tumbleweed
2109 msgid ""
2110 "However, since prototype checking happens at compile time, the assignment "
2111 "above happens too late to be of much use. You could address this by putting "
2112 "the whole loop of assignments within a BEGIN block, forcing it to occur "
2113 "during compilation."
2114 msgstr ""
2115 "ومع ذلك، بما أن فحص النموذج المبدئي يتم في وقت التجميع، فإن التعيين أعلاه "
2116 "يحدث بعد فوات الأوان ليكون ذا فائدة كبيرة. يمكنك معالجة ذلك بوضع حلقة "
2117 "التعيينات بأكملها داخل كتلة BEGIN، مما يجبرها على الحدوث أثناء التجميع."
2118
2119 #. type: Plain text
2120 #: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron
2121 #: opensuse-leap-16-1 opensuse-tumbleweed
2122 msgid ""
2123 "Access to lexicals that change over time--like those in the "
2124 "CW<\\*(C`for\\*(C'> loop above, basically aliases to elements from the "
2125 "surrounding lexical scopes-- only works with anonymous subs, not with named "
2126 "subroutines. Generally said, named subroutines do not nest properly and "
2127 "should only be declared in the main package scope."
2128 msgstr ""
2129 "الوصول إلى المتغيرات اللفظية التي تتغير بمرور الوقت - مثل تلك الموجودة في "
2130 "حلقة CW<\\*(C`for\\*(C'> أعلاه، وهي أساسًا أسماء مستعارة لعناصر من النطاقات "
2131 "اللفظية المحيطة - لا يعمل إلا مع الروتينات الفرعية المجهولة، وليس مع "
2132 "الروتينات الفرعية المسماة. بشكل عام، لا تتداخل الروتينات الفرعية المسماة "
2133 "بشكل صحيح ويجب التصريح عنها فقط في نطاق الحزمة الرئيس."
2134
2135 #. type: Plain text
2136 #: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron
2137 #: opensuse-leap-16-1 opensuse-tumbleweed
2138 msgid ""
2139 "This is because named subroutines are created at compile time so their "
2140 "lexical variables get assigned to the parent lexicals from the first "
2141 "execution of the parent block. If a parent scope is entered a second time, "
2142 "its lexicals are created again, while the nested subs still reference the "
2143 "old ones."
2144 msgstr ""
2145 "هذا لأن الروتينات الفرعية المسماة تُنشأ في وقت التجميع، لذا يتم تعيين "
2146 "متغيراتها اللفظية إلى المتغيرات اللفظية للأب من أول تنفيذ لكتلة الأب. إذا "
2147 "دُخل نطاق الأب مرة ثانية، تُنشأ متغيراته اللفظية مرة أخرى، بينما تظل الروتينات "
2148 "الفرعية المتداخلة تشير إلى القديمة."
2149
2150 #. type: Plain text
2151 #: debian-trixie debian-unstable
2152 msgid ""
2153 "Anonymous subroutines get to capture each time you execute the "
2154 "CW<\\*(C`sub\\*(C'> operator, as they are created on the fly. If you are "
2155 "accustomed to using nested subroutines in other programming languages with "
2156 "their own private variables, you'll have to work at it a bit in Perl. The "
2157 "intuitive coding of this type of thing incurs mysterious warnings about "
2158 "\"will not stay shared\" due to the reasons explained above. For example, "
2159 "this won't work:"
2160 msgstr ""
2161 "تتمكن الروتينات الفرعية المجهولة من الالتقاط في كل مرة تنفذ فيها معامل "
2162 "CW<\\*(C`sub\\*(C'>، حيث يتم إنشاؤها على الطاير. إذا كنت معتادًا على استخدام "
2163 "الروتينات الفرعية المتداخلة في لغات برمجة أخرى مع متغيراتها الخاصة، فسيتعين "
2164 "عليك العمل بجهد أكبر قليلاً في بيرل. الترميز البديهي لهذا النوع من الأشياء "
2165 "يؤدي إلى تحذيرات غامضة حول \"will not stay shared\" (لن تبقى مشتركة) بسبب "
2166 "الأسباب الموضحة أعلاه. على سبيل المثال، هذا لن يعمل:"
2167
2168 #. type: Plain text
2169 #: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron
2170 #: opensuse-leap-16-1 opensuse-tumbleweed
2171 #, no-wrap
2172 msgid ""
2173 "\\& sub outer {\n"
2174 "\\& my $x = $_[0] + 35;\n"
2175 "\\& sub inner { return $x * 19 } # WRONG\n"
2176 "\\& return $x + inner();\n"
2177 "\\& }\n"
2178 msgstr ""
2179 "\\& sub outer {\n"
2180 "\\& my $x = $_[0] + 35;\n"
2181 "\\& sub inner { return $x * 19 } # خطأ\n"
2182 "\\& return $x + inner();\n"
2183 "\\& }\n"
2184
2185 #. type: Plain text
2186 #: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron
2187 #: opensuse-leap-16-1 opensuse-tumbleweed
2188 msgid "A work-around is the following:"
2189 msgstr "الحل البديل هو ما يلي:"
2190
2191 #. type: Plain text
2192 #: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron
2193 #: opensuse-leap-16-1 opensuse-tumbleweed
2194 #, no-wrap
2195 msgid ""
2196 "\\& sub outer {\n"
2197 "\\& my $x = $_[0] + 35;\n"
2198 "\\& local *inner = sub { return $x * 19 };\n"
2199 "\\& return $x + inner();\n"
2200 "\\& }\n"
2201 msgstr ""
2202 "\\& sub outer {\n"
2203 "\\& my $x = $_[0] + 35;\n"
2204 "\\& local *inner = sub { return $x * 19 };\n"
2205 "\\& return $x + inner();\n"
2206 "\\& }\n"
2207
2208 #. type: Plain text
2209 #: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron
2210 #: opensuse-leap-16-1 opensuse-tumbleweed
2211 msgid ""
2212 "Now B<inner()> can only be called from within B<outer()>, because of the "
2213 "temporary assignments of the anonymous subroutine. But when it does, it has "
2214 "normal access to the lexical variable CW<$x> from the scope of \\&B<outer()> "
2215 "at the time outer is invoked."
2216 msgstr ""
2217 "الآن لا يمكن استدعاء B<inner()> إلا من داخل B<outer()>، بسبب التعيينات "
2218 "المؤقتة للروتين الفرعي المجهول. ولكن عندما يحدث ذلك، يكون له حق الوصول "
2219 "الطبيعي إلى المتغير اللفظي CW<$x> من نطاق B<outer()> في الوقت الذي يتم فيه "
2220 "استدعاء outer."
2221
2222 #. type: Plain text
2223 #: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron
2224 #: opensuse-leap-16-1 opensuse-tumbleweed
2225 msgid ""
2226 "This has the interesting effect of creating a function local to another "
2227 "function, something not normally supported in Perl."
2228 msgstr ""
2229 "لهذا تأثير مثير للاهتمام يتمثل في إنشاء دالة محلية لدالة أخرى، وهو أمر لا "
2230 "يدعمه بيرل عادةً."
2231
2232 #. type: IX
2233 #: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron
2234 #: opensuse-leap-16-1 opensuse-tumbleweed
2235 #, no-wrap
2236 msgid "Postfix Dereference Syntax"
2237 msgstr "صيغة فك المراجع اللاحقة (Postfix)"
2238
2239 #. type: Plain text
2240 #: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron
2241 #: opensuse-leap-16-1 opensuse-tumbleweed
2242 msgid ""
2243 "Beginning in v5.20.0, a postfix syntax for using references is available. "
2244 "It behaves as described in \"Using References\", but instead of a prefixed "
2245 "sigil, a postfixed sigil-and-star is used."
2246 msgstr ""
2247 "بدءًا من الإصدار v5.20.0، أصبحت صيغة اللاحقة (postfix) لاستخدام المراجع "
2248 "متاحة. وهي تعمل كما هو موصوف في \"استخدام المراجع\"، ولكن بدلاً من استخدام "
2249 "رمز (sigil) سابِق، يُستخدم رمز ونجمة لاحقين."
2250
2251 #. type: Plain text
2252 #: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron
2253 #: opensuse-leap-16-1 opensuse-tumbleweed
2254 msgid "For example:"
2255 msgstr "على سبيل المثال:"
2256
2257 #. type: Plain text
2258 #: debian-trixie debian-unstable
2259 #, no-wrap
2260 msgid ""
2261 "\\& $r = \\e@a;\n"
2262 "\\& @b = $r-E<gt>@*; # equivalent to @$r or @{ $r }\n"
2263 "\\&\n"
2264 "\\& $r = [ 1, [ 2, 3 ], 4 ];\n"
2265 "\\& $r-E<gt>[1]-E<gt>@*; # equivalent to @{ $r-E<gt>[1] }\n"
2266 msgstr ""
2267 "\\& $r = \\e@a;\n"
2268 "\\& @b = $r-E<gt>@*; # يكافئ @$r أو @{ $r }\n"
2269 "\\&\n"
2270 "\\& $r = [ 1, [ 2, 3 ], 4 ];\n"
2271 "\\& $r-E<gt>[1]-E<gt>@*; # يكافئ @{ $r-E<gt>[1] }\n"
2272
2273 #. type: Plain text
2274 #: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron
2275 #: opensuse-leap-16-1 opensuse-tumbleweed
2276 msgid ""
2277 "In Perl 5.20 and 5.22, this syntax must be enabled with CW<use feature "
2278 "\\&\\*(Aqpostderef\\*(Aq>. As of Perl 5.24, no feature declarations are "
2279 "required to make it available."
2280 msgstr ""
2281 "في إصداري بيرل 5.20 و 5.22، يجب تفعيل هذه الصيغة باستخدام CW<use feature "
2282 "\\&\\*(Aqpostderef\\*(Aq>. وبدءًا من بيرل 5.24، لا يلزم التصريح عن أي ميزة "
2283 "لجعلها متاحة."
2284
2285 #. type: Plain text
2286 #: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron
2287 #: opensuse-leap-16-1 opensuse-tumbleweed
2288 msgid ""
2289 "Postfix dereference should work in all circumstances where block (circumfix) "
2290 "dereference worked, and should be entirely equivalent. This syntax allows "
2291 "dereferencing to be written and read entirely left-to-right. The following "
2292 "equivalencies are defined:"
2293 msgstr ""
2294 "ينبغي أن يعمل فك المراجع اللاحق في جميع الظروف التي يعمل فيها فك المراجع "
2295 "الكتلي (المحيط)، ويجب أن يكون مكافئًا له تمامًا. تسمح هذه الصيغة بكتابة وقراءة "
2296 "فك المراجع بالكامل من اليسار إلى اليمين. عُرّفت المكافئات التالية:"
2297
2298 #. type: Plain text
2299 #: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron
2300 #: opensuse-leap-16-1 opensuse-tumbleweed
2301 #, no-wrap
2302 msgid ""
2303 "\\& $sref-E<gt>$*; # same as ${ $sref }\n"
2304 "\\& $aref-E<gt>@*; # same as @{ $aref }\n"
2305 "\\& $aref-E<gt>$#*; # same as $#{ $aref }\n"
2306 "\\& $href-E<gt>%*; # same as %{ $href }\n"
2307 "\\& $cref-E<gt>&*; # same as &{ $cref }\n"
2308 "\\& $gref-E<gt>**; # same as *{ $gref }\n"
2309 msgstr ""
2310 "\\& $sref-E<gt>$*; # يماثل ${ $sref }\n"
2311 "\\& $aref-E<gt>@*; # يماثل @{ $aref }\n"
2312 "\\& $aref-E<gt>$#*; # يماثل $#{ $aref }\n"
2313 "\\& $href-E<gt>%*; # يماثل %{ $href }\n"
2314 "\\& $cref-E<gt>&*; # يماثل &{ $cref }\n"
2315 "\\& $gref-E<gt>**; # يماثل *{ $gref }\n"
2316
2317 #. type: Plain text
2318 #: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron
2319 #: opensuse-leap-16-1 opensuse-tumbleweed
2320 msgid ""
2321 "Note especially that CW<\\*(C`$cref-E<gt>&*\\*(C'> is I<not> equivalent to "
2322 "CW<$cref-E<gt>()>, and can serve different purposes."
2323 msgstr ""
2324 "لاحظ بشكل خاص أن CW<\\*(C`$cref-E<gt>&*\\*(C'> I<ليس> مكافئًا لـ CW<$cref-"
2325 "E<gt>()>، ويمكن أن يخدم أغراضًا مختلفة."
2326
2327 #. type: Plain text
2328 #: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron
2329 #: opensuse-leap-16-1 opensuse-tumbleweed
2330 msgid ""
2331 "Glob elements can be extracted through the postfix dereferencing feature:"
2332 msgstr "يمكن استخراج عناصر النوع العام (Glob) عبر ميزة فك المراجع اللاحقة:"
2333
2334 #. type: Plain text
2335 #: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron
2336 #: opensuse-leap-16-1 opensuse-tumbleweed
2337 #, no-wrap
2338 msgid "\\& $gref-E<gt>*{SCALAR}; # same as *{ $gref }{SCALAR}\n"
2339 msgstr "\\& $gref-E<gt>*{SCALAR}; # يماثل *{ $gref }{SCALAR}\n"
2340
2341 #. type: Plain text
2342 #: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron
2343 #: opensuse-leap-16-1 opensuse-tumbleweed
2344 msgid ""
2345 "Postfix array and scalar dereferencing I<can> be used in interpolating "
2346 "strings (double quotes or the CW<\\*(C`qq\\*(C'> operator), but only if the "
2347 "\\&CW<\\*(C`postderef_qq\\*(C'> feature is enabled. Interpolation of postfix "
2348 "array highest index access (CW<\\*(C`-E<gt>$#*\\*(C'>) is also supported "
2349 "when the CW<\\*(C`postderef_qq\\*(C'> feature is enabled."
2350 msgstr ""
2351 "I<يمكن> استخدام فك مراجع المصفوفات والمتغيرات اللاحقة في استكمال السلاسل "
2352 "النصية (علامات الاقتباس المزدوجة أو معامل CW<\\*(C`qq\\*(C'>)، ولكن فقط في "
2353 "حال تفعيل ميزة \\&CW<\\*(C`postderef_qq\\*(C'>. كما يُدعم استكمال الوصول إلى "
2354 "أعلى فهرس للمصفوفة اللاحقة (CW<\\*(C`-E<gt>$#*\\*(C'>) عند تفعيل ميزة "
2355 "CW<\\*(C`postderef_qq\\*(C'>."
2356
2357 #. type: IX
2358 #: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron
2359 #: opensuse-leap-16-1 opensuse-tumbleweed
2360 #, no-wrap
2361 msgid "Postfix Reference Slicing"
2362 msgstr "تشريح المراجع اللاحقة"
2363
2364 #. type: Plain text
2365 #: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron
2366 #: opensuse-leap-16-1 opensuse-tumbleweed
2367 msgid ""
2368 "Value slices of arrays and hashes may also be taken with postfix "
2369 "dereferencing notation, with the following equivalencies:"
2370 msgstr ""
2371 "يمكن أيضًا أخذ شرائح القيم للمصفوفات والمجموعات المترابطة (hashes) باستخدام "
2372 "تدوين فك المراجع اللاحق، مع المكافئات التالية:"
2373
2374 #. type: Plain text
2375 #: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron
2376 #: opensuse-leap-16-1 opensuse-tumbleweed
2377 #, no-wrap
2378 msgid ""
2379 "\\& $aref-E<gt>@[ ... ]; # same as @$aref[ ... ]\n"
2380 "\\& $href-E<gt>@{ ... }; # same as @$href{ ... }\n"
2381 msgstr ""
2382 "\\& $aref-E<gt>@[ ... ]; # يماثل @$aref[ ... ]\n"
2383 "\\& $href-E<gt>@{ ... }; # يماثل @$href{ ... }\n"
2384
2385 #. type: Plain text
2386 #: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron
2387 #: opensuse-leap-16-1 opensuse-tumbleweed
2388 msgid ""
2389 "Postfix key/value pair slicing, added in 5.20.0 and documented in the Key/"
2390 "Value Hash Slices section of perldata, also behaves as expected:"
2391 msgstr ""
2392 "تشريح أزواج المفاتيح/القيم اللاحق، الذي أُضيف في 5.20.0 ووُثق في قسم Key/Value "
2393 "Hash Slices من perldata، يعمل أيضًا كما هو متوقع:"
2394
2395 #. type: Plain text
2396 #: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron
2397 #: opensuse-leap-16-1 opensuse-tumbleweed
2398 #, no-wrap
2399 msgid ""
2400 "\\& $aref-E<gt>%[ ... ]; # same as %$aref[ ... ]\n"
2401 "\\& $href-E<gt>%{ ... }; # same as %$href{ ... }\n"
2402 msgstr ""
2403 "\\& $aref-E<gt>%[ ... ]; # يماثل %$aref[ ... ]\n"
2404 "\\& $href-E<gt>%{ ... }; # يماثل %$href{ ... }\n"
2405
2406 #. type: Plain text
2407 #: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron
2408 #: opensuse-leap-16-1 opensuse-tumbleweed
2409 msgid ""
2410 "As with postfix array, postfix value slice dereferencing I<can> be used in "
2411 "interpolating strings (double quotes or the CW<\\*(C`qq\\*(C'> operator), "
2412 "but only if the CW<\\*(C`postderef_qq\\*(C'> feature is enabled."
2413 msgstr ""
2414 "كما هو الحال مع المصفوفة اللاحقة، I<يمكن> استخدام فك مراجع تشريح القيم "
2415 "اللاحق في استكمال السلاسل النصية (علامات الاقتباس المزدوجة أو معامل "
2416 "CW<\\*(C`qq\\*(C'>)، ولكن فقط في حال تفعيل ميزة CW<\\*(C`postderef_qq\\*(C'>."
2417
2418 #. type: IX
2419 #: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron
2420 #: opensuse-leap-16-1 opensuse-tumbleweed
2421 #, no-wrap
2422 msgid "Assigning to References"
2423 msgstr "الإسناد إلى المراجع"
2424
2425 #. type: Plain text
2426 #: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron
2427 #: opensuse-leap-16-1 opensuse-tumbleweed
2428 msgid ""
2429 "Beginning in v5.22.0, the referencing operator can be assigned to. It "
2430 "performs an aliasing operation, so that the variable name referenced on the "
2431 "left-hand side becomes an alias for the thing referenced on the right-hand "
2432 "side:"
2433 msgstr ""
2434 "بدءًا من v5.22.0، يمكن الإسناد إلى معامل المراجعة. وهو يؤدي عملية استعارة "
2435 "(aliasing)، بحيث يصبح اسم المتغير المشار إليه في الجانب الأيسر مستعارًا للشيء "
2436 "المشار إليه في الجانب الأيمن:"
2437
2438 #. type: Plain text
2439 #: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron
2440 #: opensuse-leap-16-1 opensuse-tumbleweed
2441 #, no-wrap
2442 msgid ""
2443 "\\& \\e$x = \\e$y; # $x and $y now point to the same scalar\n"
2444 "\\& \\e&foo = \\e&bar; # foo() now means bar()\n"
2445 msgstr ""
2446 "\\& \\e$x = \\e$y; # يشير $x و $y الآن إلى نفس المتغير\n"
2447 "\\& \\e&foo = \\e&bar; # تعني foo() الآن bar()\n"
2448
2449 #. type: Plain text
2450 #: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron
2451 #: opensuse-leap-16-1 opensuse-tumbleweed
2452 msgid ""
2453 "This syntax must be enabled with CW<\\*(C`use feature "
2454 "\\*(Aqrefaliasing\\*(Aq\\*(C'>. It is experimental, and will warn by "
2455 "default unless CW<no warnings \\&\\*(Aqexperimental::refaliasing\\*(Aq> is "
2456 "in effect."
2457 msgstr ""
2458 "يجب تفعيل هذه الصيغة باستخدام CW<\\*(C`use feature "
2459 "\\*(Aqrefaliasing\\*(Aq\\*(C'>. وهي تجريبية، وستُصدر تحذيرًا بشكل مبدئي ما لم "
2460 "يُفعّل CW<no warnings \\&\\*(Aqexperimental::refaliasing\\*(Aq>."
2461
2462 #. type: Plain text
2463 #: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron
2464 #: opensuse-leap-16-1 opensuse-tumbleweed
2465 msgid ""
2466 "These forms may be assigned to, and cause the right-hand side to be "
2467 "evaluated in scalar context:"
2468 msgstr ""
2469 "يمكن الإسناد إلى هذه الأشكال، وتؤدي إلى تقييم الجانب الأيمن في سياق مفرد "
2470 "(scalar):"
2471
2472 #. type: Plain text
2473 #: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron
2474 #: opensuse-leap-16-1 opensuse-tumbleweed
2475 #, no-wrap
2476 msgid ""
2477 "\\& \\e$scalar\n"
2478 "\\& \\e@array\n"
2479 "\\& \\e%hash\n"
2480 "\\& \\e&sub\n"
2481 "\\& \\emy $scalar\n"
2482 "\\& \\emy @array\n"
2483 "\\& \\emy %hash\n"
2484 "\\& \\estate $scalar # or @array, etc.\n"
2485 "\\& \\eour $scalar # etc.\n"
2486 "\\& \\elocal $scalar # etc.\n"
2487 "\\& \\elocal our $scalar # etc.\n"
2488 "\\& \\e$some_array[$index]\n"
2489 "\\& \\e$some_hash{$key}\n"
2490 "\\& \\elocal $some_array[$index]\n"
2491 "\\& \\elocal $some_hash{$key}\n"
2492 "\\& condition ? \\e$this : \\e$that[0] # etc.\n"
2493 msgstr ""
2494 "\\& \\e$scalar\n"
2495 "\\& \\e@array\n"
2496 "\\& \\e%hash\n"
2497 "\\& \\e&sub\n"
2498 "\\& \\emy $scalar\n"
2499 "\\& \\emy @array\n"
2500 "\\& \\emy %hash\n"
2501 "\\& \\estate $scalar # أو @array، إلخ.\n"
2502 "\\& \\eour $scalar # إلخ.\n"
2503 "\\& \\elocal $scalar # إلخ.\n"
2504 "\\& \\elocal our $scalar # إلخ.\n"
2505 "\\& \\e$some_array[$index]\n"
2506 "\\& \\e$some_hash{$key}\n"
2507 "\\& \\elocal $some_array[$index]\n"
2508 "\\& \\elocal $some_hash{$key}\n"
2509 "\\& condition ? \\e$this : \\e$that[0] # إلخ.\n"
2510
2511 #. type: Plain text
2512 #: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron
2513 #: opensuse-leap-16-1 opensuse-tumbleweed
2514 msgid ""
2515 "Slicing operations and parentheses cause the right-hand side to be evaluated "
2516 "in list context:"
2517 msgstr ""
2518 "تؤدي عمليات التشريح والأقواس إلى تقييم الجانب الأيمن في سياق قائمة (list):"
2519
2520 #. type: Plain text
2521 #: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron
2522 #: opensuse-leap-16-1 opensuse-tumbleweed
2523 #, no-wrap
2524 msgid ""
2525 "\\& \\e@array[5..7]\n"
2526 "\\& (\\e@array[5..7])\n"
2527 "\\& \\e(@array[5..7])\n"
2528 "\\& \\e@hash{\\*(Aqfoo\\*(Aq,\\*(Aqbar\\*(Aq}\n"
2529 "\\& (\\e@hash{\\*(Aqfoo\\*(Aq,\\*(Aqbar\\*(Aq})\n"
2530 "\\& \\e(@hash{\\*(Aqfoo\\*(Aq,\\*(Aqbar\\*(Aq})\n"
2531 "\\& (\\e$scalar)\n"
2532 "\\& \\e($scalar)\n"
2533 "\\& \\e(my $scalar)\n"
2534 "\\& \\emy($scalar)\n"
2535 "\\& (\\e@array)\n"
2536 "\\& (\\e%hash)\n"
2537 "\\& (\\e&sub)\n"
2538 "\\& \\e(&sub)\n"
2539 "\\& \\e($foo, @bar, %baz)\n"
2540 "\\& (\\e$foo, \\e@bar, \\e%baz)\n"
2541 msgstr ""
2542 "\\& \\e@array[5..7]\n"
2543 "\\& (\\e@array[5..7])\n"
2544 "\\& \\e(@array[5..7])\n"
2545 "\\& \\e@hash{\\*(Aqfoo\\*(Aq,\\*(Aqbar\\*(Aq}\n"
2546 "\\& (\\e@hash{\\*(Aqfoo\\*(Aq,\\*(Aqbar\\*(Aq})\n"
2547 "\\& \\e(@hash{\\*(Aqfoo\\*(Aq,\\*(Aqbar\\*(Aq})\n"
2548 "\\& (\\e$scalar)\n"
2549 "\\& \\e($scalar)\n"
2550 "\\& \\e(my $scalar)\n"
2551 "\\& \\emy($scalar)\n"
2552 "\\& (\\e@array)\n"
2553 "\\& (\\e%hash)\n"
2554 "\\& (\\e&sub)\n"
2555 "\\& \\e(&sub)\n"
2556 "\\& \\e($foo, @bar, %baz)\n"
2557 "\\& (\\e$foo, \\e@bar, \\e%baz)\n"
2558
2559 #. type: Plain text
2560 #: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron
2561 #: opensuse-leap-16-1 opensuse-tumbleweed
2562 msgid ""
2563 "Each element on the right-hand side must be a reference to a datum of the "
2564 "right type. Parentheses immediately surrounding an array (and possibly also "
2565 "CW<\\*(C`my\\*(C'>/CW<\\*(C`state\\*(C'>/CW<\\*(C`our\\*(C'>/"
2566 "CW<\\*(C`local\\*(C'>) will make each element of the array an alias to the "
2567 "corresponding scalar referenced on the right-hand side:"
2568 msgstr ""
2569 "يجب أن يكون كل عنصر في الجانب الأيمن مرجعًا لبيانات من النوع الصحيح. الأقواس "
2570 "التي تحيط بمصفوفة مباشرة (وربما أيضًا CW<\\*(C`my\\*(C'>/"
2571 "CW<\\*(C`state\\*(C'>/CW<\\*(C`our\\*(C'>/CW<\\*(C`local\\*(C'>) ستجعل كل "
2572 "عنصر في المصفوفة مستعارًا للمتغير المقابل المشار إليه في الجانب الأيمن:"
2573
2574 #. type: Plain text
2575 #: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron
2576 #: opensuse-leap-16-1 opensuse-tumbleweed
2577 #, no-wrap
2578 msgid ""
2579 "\\& \\e(@x) = \\e(@y); # @x and @y now have the same elements\n"
2580 "\\& \\emy(@x) = \\e(@y); # likewise\n"
2581 "\\& \\e(my @x) = \\e(@y); # likewise\n"
2582 "\\& push @x, 3; # but now @x has an extra element that @y lacks\n"
2583 "\\& \\e(@x) = (\\e$x, \\e$y, \\e$z); # @x now contains $x, $y, and $z\n"
2584 msgstr ""
2585 "\\& \\e(@x) = \\e(@y); # أصبح لـ @x و @y نفس العناصر الآن\n"
2586 "\\& \\emy(@x) = \\e(@y); # وبالمثل\n"
2587 "\\& \\e(my @x) = \\e(@y); # وبالمثل\n"
2588 "\\& push @x, 3; # ولكن الآن @x بها عنصر إضافي تفتقر إليه @y\n"
2589 "\\& \\e(@x) = (\\e$x, \\e$y, \\e$z); # تحتوي @x الآن على $x و $y و $z\n"
2590
2591 #. type: Plain text
2592 #: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron
2593 #: opensuse-leap-16-1 opensuse-tumbleweed
2594 msgid ""
2595 "Combining that form with CW<\\*(C`local\\*(C'> and putting parentheses "
2596 "immediately around a hash are forbidden (because it is not clear what they "
2597 "should do):"
2598 msgstr ""
2599 "يُحظر دمج هذا الشكل مع CW<\\*(C`local\\*(C'> ووضع أقواس مباشرة حول المجموعات "
2600 "المترابطة (hashes) (لأنه من غير الواضح ما الذي ينبغي أن تفعله):"
2601
2602 #. type: Plain text
2603 #: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron
2604 #: opensuse-leap-16-1 opensuse-tumbleweed
2605 #, no-wrap
2606 msgid ""
2607 "\\& \\elocal(@array) = foo(); # WRONG\n"
2608 "\\& \\e(%hash) = bar(); # WRONG\n"
2609 msgstr ""
2610 "\\& \\elocal(@array) = foo(); # خطأ\n"
2611 "\\& \\e(%hash) = bar(); # خطأ\n"
2612
2613 #. type: Plain text
2614 #: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron
2615 #: opensuse-leap-16-1 opensuse-tumbleweed
2616 msgid ""
2617 "Assignment to references and non-references may be combined in lists and "
2618 "conditional ternary expressions, as long as the values on the right-hand "
2619 "side are the right type for each element on the left, though this may make "
2620 "for obfuscated code:"
2621 msgstr ""
2622 "يمكن دمج الإسناد إلى المراجع وغير المراجع في القوائم والتعبيرات الثلاثية "
2623 "الشرطية، طالما أن القيم في الجانب الأيمن هي من النوع الصحيح لكل عنصر في "
2624 "اليسار، وإن كان هذا قد يجعل الكود غامضًا:"
2625
2626 #. type: Plain text
2627 #: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron
2628 #: opensuse-leap-16-1 opensuse-tumbleweed
2629 #, no-wrap
2630 msgid ""
2631 "\\& (my $tom, \\emy $dick, \\emy @harry) = (\\e1, \\e2, [1..3]);\n"
2632 "\\& # $tom is now \\e1\n"
2633 "\\& # $dick is now 2 (read-only)\n"
2634 "\\& # @harry is (1,2,3)\n"
2635 "\\&\n"
2636 "\\& my $type = ref $thingy;\n"
2637 "\\& ($type ? $type eq \\*(AqARRAY\\*(Aq ? \\e@foo : \\e$bar : $baz) = $thingy;\n"
2638 msgstr ""
2639 "\\& (my $tom, \\emy $dick, \\emy @harry) = (\\e1, \\e2, [1..3]);\n"
2640 "\\& # $tom هو الآن \\e1\n"
2641 "\\& # $dick هو الآن 2 (للقراءة فقط)\n"
2642 "\\& # @harry هي (1,2,3)\n"
2643 "\\&\n"
2644 "\\& my $type = ref $thingy;\n"
2645 "\\& ($type ? $type eq \\*(AqARRAY\\*(Aq ? \\e@foo : \\e$bar : $baz) = $thingy;\n"
2646
2647 #. type: Plain text
2648 #: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron
2649 #: opensuse-leap-16-1 opensuse-tumbleweed
2650 msgid ""
2651 "A reference assignment in list context returns a list of references to each "
2652 "left-hand value. So for example"
2653 msgstr ""
2654 "إسناد المراجع في سياق قائمة يعيد قائمة من المراجع لكل قيمة في الجانب الأيسر. "
2655 "فعلى سبيل المثال"
2656
2657 #. type: Plain text
2658 #: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron
2659 #: opensuse-leap-16-1 opensuse-tumbleweed
2660 #, no-wrap
2661 msgid "\\& @b = ((\\e$l1, \\e$l2, \\e(@a)) = (\\e$r1, \\e$r2, $\\er3, \\e$4));\n"
2662 msgstr "\\& @b = ((\\e$l1, \\e$l2, \\e(@a)) = (\\e$r1, \\e$r2, $\\er3, \\e$4));\n"
2663
2664 #. type: Plain text
2665 #: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron
2666 #: opensuse-leap-16-1 opensuse-tumbleweed
2667 msgid "is equivalent to"
2668 msgstr "يكافئ"
2669
2670 #. type: Plain text
2671 #: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron
2672 #: opensuse-leap-16-1 opensuse-tumbleweed
2673 #, no-wrap
2674 msgid ""
2675 "\\& (\\e$l1, \\e$l2, \\e(@a)) = (\\e$r1, \\e$r2, $\\er3, \\e$4);\n"
2676 "\\& @b = (\\e$l1, \\e$l2, \\e$a[0], \\e$a[1]);\n"
2677 msgstr ""
2678 "\\& (\\e$l1, \\e$l2, \\e(@a)) = (\\e$r1, \\e$r2, $\\er3, \\e$4);\n"
2679 "\\& @b = (\\e$l1, \\e$l2, \\e$a[0], \\e$a[1]);\n"
2680
2681 #. type: Plain text
2682 #: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron
2683 #: opensuse-leap-16-1 opensuse-tumbleweed
2684 msgid ""
2685 "The CW<\\*(C`foreach\\*(C'> loop can also take a reference constructor for "
2686 "its loop variable, though the syntax is limited to one of the following, "
2687 "with an optional CW<\\*(C`my\\*(C'>, CW<\\*(C`state\\*(C'>, or "
2688 "CW<\\*(C`our\\*(C'> after the backslash:"
2689 msgstr ""
2690 "يمكن لحلقة CW<\\*(C`foreach\\*(C'> أيضًا أن تأخذ منشئ مرجع لمتغير الحلقة "
2691 "الخاص بها، وإن كانت الصيغة تقتصر على أحد ما يلي، مع إمكانية استخدام "
2692 "CW<\\*(C`my\\*(C'> أو CW<\\*(C`state\\*(C'> أو CW<\\*(C`our\\*(C'> بعد الخط "
2693 "المائل العكسي:"
2694
2695 #. type: Plain text
2696 #: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron
2697 #: opensuse-leap-16-1 opensuse-tumbleweed
2698 #, no-wrap
2699 msgid ""
2700 "\\& \\e$s\n"
2701 "\\& \\e@a\n"
2702 "\\& \\e%h\n"
2703 "\\& \\e&c\n"
2704 msgstr ""
2705 "\\& \\e$s\n"
2706 "\\& \\e@a\n"
2707 "\\& \\e%h\n"
2708 "\\& \\e&c\n"
2709
2710 #. type: Plain text
2711 #: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron
2712 #: opensuse-leap-16-1 opensuse-tumbleweed
2713 msgid ""
2714 "No parentheses are permitted. This feature is particularly useful for "
2715 "arrays-of-arrays, or arrays-of-hashes:"
2716 msgstr ""
2717 "لا يُسمح باستخدام الأقواس. هذه الميزة مفيدة بشكل خاص لمصفوفات المصفوفات، أو "
2718 "مصفوفات المجموعات المترابطة (arrays-of-hashes):"
2719
2720 #. type: Plain text
2721 #: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron
2722 #: opensuse-leap-16-1 opensuse-tumbleweed
2723 #, no-wrap
2724 msgid ""
2725 "\\& foreach \\emy @a (@array_of_arrays) {\n"
2726 "\\& frobnicate($a[0], $a[-1]);\n"
2727 "\\& }\n"
2728 "\\&\n"
2729 "\\& foreach \\emy %h (@array_of_hashes) {\n"
2730 "\\& $h{gelastic}++ if $h{type} eq \\*(Aqfunny\\*(Aq;\n"
2731 "\\& }\n"
2732 msgstr ""
2733 "\\& foreach \\emy @a (@array_of_arrays) {\n"
2734 "\\& frobnicate($a[0], $a[-1]);\n"
2735 "\\& }\n"
2736 "\\&\n"
2737 "\\& foreach \\emy %h (@array_of_hashes) {\n"
2738 "\\& $h{gelastic}++ if $h{type} eq \\*(Aqfunny\\*(Aq;\n"
2739 "\\& }\n"
2740
2741 #. type: Plain text
2742 #: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron
2743 #: opensuse-leap-16-1 opensuse-tumbleweed
2744 msgid ""
2745 "\\&B<CAVEAT:> Aliasing does not work correctly with closures. If you try to "
2746 "alias lexical variables from an inner subroutine or CW<\\*(C`eval\\*(C'>, "
2747 "the aliasing will only be visible within that inner sub, and will not affect "
2748 "the outer subroutine where the variables are declared. This bizarre "
2749 "behavior is subject to change."
2750 msgstr ""
2751 "\\&B<تنبيه:> الاستعارة (Aliasing) لا تعمل بشكل صحيح مع الإغلاقات (closures). "
2752 "إذا حاولت استعارة متغيرات معجمية من دالة فرعية داخلية أو "
2753 "CW<\\*(C`eval\\*(C'>، فسيكون الاستعارة مرئيًا فقط داخل تلك الدالة الفرعية، "
2754 "ولن يؤثر على الدالة الخارجية التي صُرّح عن المتغيرات فيها. هذا السلوك الغريب "
2755 "عرضة للتغيير."
2756
2757 #. type: IX
2758 #: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron
2759 #: opensuse-leap-16-1 opensuse-tumbleweed
2760 #, no-wrap
2761 msgid "Declaring a Reference to a Variable"
2762 msgstr "التصريح عن مرجع لمتغير"
2763
2764 #. type: Plain text
2765 #: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron
2766 #: opensuse-leap-16-1 opensuse-tumbleweed
2767 msgid ""
2768 "Beginning in v5.26.0, the referencing operator can come after "
2769 "CW<\\*(C`my\\*(C'>, \\&CW<\\*(C`state\\*(C'>, CW<\\*(C`our\\*(C'>, or "
2770 "CW<\\*(C`local\\*(C'>. This syntax must be enabled with CW<\\*(C`use "
2771 "feature \\*(Aqdeclared_refs\\*(Aq\\*(C'>. It is experimental, and will warn "
2772 "by default unless CW<\\*(C`no warnings \\*(Aqexperimental::"
2773 "refaliasing\\*(Aq\\*(C'> is in effect."
2774 msgstr ""
2775 "بدءًا من v5.26.0، يمكن أن يأتي معامل المراجعة بعد CW<\\*(C`my\\*(C'>، أو "
2776 "\\&CW<\\*(C`state\\*(C'>، أو CW<\\*(C`our\\*(C'>، أو CW<\\*(C`local\\*(C'>. "
2777 "يجب تفعيل هذه الصيغة باستخدام CW<\\*(C`use feature "
2778 "\\*(Aqdeclared_refs\\*(Aq\\*(C'>. وهي تجريبية، وستُصدر تحذيرًا بشكل مبدئي ما "
2779 "لم يُفعّل CW<\\*(C`no warnings \\*(Aqexperimental::refaliasing\\*(Aq\\*(C'>."
2780
2781 #. type: Plain text
2782 #: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron
2783 #: opensuse-leap-16-1 opensuse-tumbleweed
2784 msgid "This feature makes these:"
2785 msgstr "هذه الميزة تجعل هذه:"
2786
2787 #. type: Plain text
2788 #: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron
2789 #: opensuse-leap-16-1 opensuse-tumbleweed
2790 #, no-wrap
2791 msgid ""
2792 "\\& my \\e$x;\n"
2793 "\\& our \\e$y;\n"
2794 msgstr ""
2795 "\\& my \\e$x;\n"
2796 "\\& our \\e$y;\n"
2797
2798 #. type: Plain text
2799 #: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron
2800 #: opensuse-leap-16-1 opensuse-tumbleweed
2801 msgid "equivalent to:"
2802 msgstr "تكافئ:"
2803
2804 #. type: Plain text
2805 #: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron
2806 #: opensuse-leap-16-1 opensuse-tumbleweed
2807 #, no-wrap
2808 msgid ""
2809 "\\& \\emy $x;\n"
2810 "\\& \\eour $x;\n"
2811 msgstr ""
2812 "\\& \\emy $x;\n"
2813 "\\& \\eour $x;\n"
2814
2815 #. type: Plain text
2816 #: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron
2817 #: opensuse-leap-16-1 opensuse-tumbleweed
2818 msgid ""
2819 "It is intended mainly for use in assignments to references (see \"Assigning "
2820 "to References\", above). It also allows the backslash to be used on just "
2821 "some items in a list of declared variables:"
2822 msgstr ""
2823 "الغرض منها رئيس هو الاستخدام في الإسنادات إلى المراجع (انظر \"الإسناد إلى "
2824 "المراجع\" أعلاه). كما أنها تسمح باستخدام الخط المائل العكسي على بعض العناصر "
2825 "فقط في قائمة المتغيرات المُصرح عنها:"
2826
2827 #. type: Plain text
2828 #: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron
2829 #: opensuse-leap-16-1 opensuse-tumbleweed
2830 #, no-wrap
2831 msgid "\\& my ($foo, \\e@bar, \\e%baz); # equivalent to: my $foo, \\emy(@bar, %baz);\n"
2832 msgstr "\\& my ($foo, \\e@bar, \\e%baz); # يكافئ: my $foo, \\emy(@bar, %baz);\n"
2833
2834 #. type: IX
2835 #: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron
2836 #: opensuse-leap-16-1 opensuse-tumbleweed
2837 #, no-wrap
2838 msgid "WARNING: Don't use references as hash keys"
2839 msgstr "تحذير: لا تستخدم المراجع كمفاتيح لمجموعة مترابطة (hash)"
2840
2841 #. type: IX
2842 #: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron
2843 #: opensuse-leap-16-1 opensuse-tumbleweed
2844 #, no-wrap
2845 msgid "reference, string context reference, use as hash key"
2846 msgstr "المرجع، مرجع سياق السلسلة، الاستخدام كمفتاح لمجموعة مترابطة"
2847
2848 #. type: Plain text
2849 #: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron
2850 #: opensuse-leap-16-1 opensuse-tumbleweed
2851 msgid ""
2852 "You may not (usefully) use a reference as the key to a hash. It will be "
2853 "converted into a string:"
2854 msgstr ""
2855 "لا يمكنك (بشكل مفيد) استخدام مرجع كمفتاح لمجموعة مترابطة. سيتم تحويله إلى "
2856 "سلسلة نصية:"
2857
2858 #. type: Plain text
2859 #: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron
2860 #: opensuse-leap-16-1 opensuse-tumbleweed
2861 #, no-wrap
2862 msgid "\\& $x{ \\e$x } = $x;\n"
2863 msgstr "\\& $x{ \\e$x } = $x;\n"
2864
2865 #. type: Plain text
2866 #: debian-trixie debian-unstable
2867 msgid ""
2868 "If you try to dereference the key, it won't do a hard dereference, and you "
2869 "won't accomplish what you're attempting. You might want to do something "
2870 "more like"
2871 msgstr ""
2872 "إذا حاولت فك مراجع المفتاح، فلن يؤدي ذلك إلى فك مراجع حقيقي، ولن تحقق ما "
2873 "تحاول القيام به. قد ترغب في القيام بشيء أقرب إلى"
2874
2875 #. type: Plain text
2876 #: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron
2877 #: opensuse-leap-16-1 opensuse-tumbleweed
2878 #, no-wrap
2879 msgid ""
2880 "\\& $r = \\e@a;\n"
2881 "\\& $x{ $r } = $r;\n"
2882 msgstr ""
2883 "\\& $r = \\e@a;\n"
2884 "\\& $x{ $r } = $r;\n"
2885
2886 #. type: Plain text
2887 #: debian-trixie debian-unstable
2888 msgid ""
2889 "And then at least you can use the B<values()>, which will be real refs, "
2890 "instead of the B<keys()>, which won't."
2891 msgstr ""
2892 "وبعد ذلك، يمكنك على الأقل استخدام B<values()>، والتي ستكون مراجع حقيقية، "
2893 "بدلاً من B<keys()>، التي لن تكون كذلك."
2894
2895 #. type: Plain text
2896 #: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron
2897 #: opensuse-leap-16-1 opensuse-tumbleweed
2898 msgid ""
2899 "The standard Tie::RefHash module provides a convenient workaround to this."
2900 msgstr "توفر وحدة Tie::RefHash القياسية حلاً مناسبًا لهذا الأمر."
2901
2902 #. type: IX
2903 #: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron
2904 #: opensuse-leap-16-1 opensuse-tumbleweed
2905 #, no-wrap
2906 msgid "SEE ALSO"
2907 msgstr "انظر أيضًا"
2908
2909 #. type: Plain text
2910 #: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron
2911 #: opensuse-leap-16-1 opensuse-tumbleweed
2912 msgid ""
2913 "Besides the obvious documents, source code can be instructive. Some "
2914 "pathological examples of the use of references can be found in the I<t/op/"
2915 "ref.t> regression test in the Perl source directory."
2916 msgstr ""
2917 "بصرف النظر عن الوثائق البديهية، يمكن أن يكون الكود المصدري تعليميًا. يمكن "
2918 "العثور على بعض الأمثلة المعقدة لاستخدام المراجع في اختبار التراجع I<t/op/ref."
2919 "t> في دليل مصدر بيرل."
2920
2921 #. type: Plain text
2922 #: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron
2923 #: opensuse-leap-16-1 opensuse-tumbleweed
2924 msgid ""
2925 "See also perldsc and perllol for how to use references to create complex "
2926 "data structures, and perlootut and perlobj for how to use them to create "
2927 "objects."
2928 msgstr ""
2929 "انظر أيضًا perldsc و perllol لمعرفة كيفية استخدام المراجع لإنشاء هياكل بيانات "
2930 "معقدة، و perlootut و perlobj لمعرفة كيفية استخدامها لإنشاء كائنات."
2931
2932 #. type: TH
2933 #: debian-unstable
2934 #, no-wrap
2935 msgid "2025-11-16"
2936 msgstr "16 نوفمبر 2025"
2937
2938 #. type: TH
2939 #: fedora-44 opensuse-leap-16-1 opensuse-tumbleweed
2940 #, no-wrap
2941 msgid "2026-03-09"
2942 msgstr "9 مارس 2026"
2943
2944 #. type: TH
2945 #: fedora-44 opensuse-leap-16-1 opensuse-tumbleweed
2946 #, no-wrap
2947 msgid "perl v5.42.1"
2948 msgstr "بيرل v5.42.1"
2949
2950 #. type: Plain text
2951 #: fedora-44 fedora-rawhide mageia-cauldron opensuse-leap-16-1
2952 #: opensuse-tumbleweed
2953 msgid ""
2954 "Symbolic references are names of variables or other objects, just as a "
2955 "symbolic link in a Unix filesystem contains merely the name of a file. The "
2956 "CW<*glob> notation is something of a symbolic reference. (Symbolic "
2957 "references are sometimes called \"soft references\", but please don\\*(Aqt "
2958 "call them that; references are confusing enough without useless synonyms.)"
2959 msgstr ""
2960 "المراجع الرمزية هي أسماء لمتغيرات أو كائنات أخرى، تمامًا كما يحتوي الارتباط "
2961 "الرمزي في نظام ملفات Unix على مجرد اسم ملف. تدوين CW<*glob> هو نوع من "
2962 "المراجع الرمزية. (تُسمى المراجع الرمزية أحيانًا \"مراجع لينة\"، ولكن يُرجى عدم "
2963 "تسميتها كذلك؛ فالمراجع مربكة بما يكفي دون مرادفات عديمة الفائدة)."
2964
2965 #. type: Plain text
2966 #: fedora-44 fedora-rawhide mageia-cauldron opensuse-leap-16-1
2967 #: opensuse-tumbleweed
2968 msgid ""
2969 "References are easy to use in Perl. There is just one overriding principle: "
2970 "in general, Perl does no implicit referencing or dereferencing. When a "
2971 "scalar is holding a reference, it always behaves as a simple scalar. It "
2972 "doesn\\*(Aqt magically start being an array or hash or subroutine; you have "
2973 "to tell it explicitly to do so, by dereferencing it."
2974 msgstr ""
2975 "المراجع سهلة الاستخدام في بيرل. هناك مبدأ رئيس واحد فقط: بشكل عام، لا يقوم "
2976 "بيرل بأي مراجعة أو فك مراجع ضمني. عندما يحمل متغير مفرد مرجعًا، فإنه يتصرف "
2977 "دائمًا كمتغير مفرد بسيط. ولا يبدأ سحريًا في أن يكون مصفوفة أو مجموعة مترابطة "
2978 "أو دالة فرعية؛ عليك إخباره صراحةً بالقيام بذلك، عن طريق فك مراجعة المتغير."
2979
2980 #. type: Plain text
2981 #: fedora-44 fedora-rawhide mageia-cauldron opensuse-leap-16-1
2982 #: opensuse-tumbleweed
2983 msgid ""
2984 "By using the backslash operator on a variable, subroutine, or value. (This "
2985 "works much like the & (address-of) operator in C.) This typically creates "
2986 "I<another> reference to a variable, because there\\*(Aqs already a reference "
2987 "to the variable in the symbol table. But the symbol table reference might "
2988 "go away, and you\\*(Aqll still have the reference that the backslash "
2989 "returned. Here are some examples:"
2990 msgstr ""
2991 "باستخدام معامل الخط المائل العكسي على متغير أو دالة فرعية أو قيمة. (هذا يعمل "
2992 "بشكل مشابه جدًا لمعامل & (عنوان الـ) في لغة C.) يؤدي هذا عادةً إلى إنشاء مرجع "
2993 "I<آخر> لمتغير، لأن هناك بالفعل مرجعًا للمتغير في جدول الرموز. ولكن قد يختفي "
2994 "مرجع جدول الرموز، وسيظل لديك المرجع الذي أعاده الخط المائل العكسي. فيما يلي "
2995 "بعض الأمثلة:"
2996
2997 #. type: Plain text
2998 #: fedora-44 fedora-rawhide mageia-cauldron opensuse-leap-16-1
2999 #: opensuse-tumbleweed
3000 msgid ""
3001 "It isn\\*(Aqt possible to create a true reference to an IO handle "
3002 "(filehandle or dirhandle) using the backslash operator. The most you can "
3003 "get is a reference to a typeglob, which is actually a complete symbol table "
3004 "entry. But see the explanation of the CW<*foo{THING}> syntax below. "
3005 "However, you can still use type globs and globrefs as though they were IO "
3006 "handles."
3007 msgstr ""
3008 "ليس من الممكن إنشاء مرجع حقيقي لمقبض إدخال/إخراج (IO handle) (مقبض ملف أو "
3009 "مقبض دليل) باستخدام معامل الخط المائل العكسي. أقصى ما يمكنك الحصول عليه هو "
3010 "مرجع لـ typeglob، وهو في الواقع إدخال كامل في جدول الرموز. ولكن انظر شرح "
3011 "صيغة CW<*foo{THING}> أدناه. ومع ذلك، لا يزال بإمكانك استخدام type globs و "
3012 "globrefs كما لو كانت مقابض إدخال/إخراج."
3013
3014 #. type: Plain text
3015 #: fedora-44 fedora-rawhide mageia-cauldron opensuse-leap-16-1
3016 #: opensuse-tumbleweed
3017 msgid ""
3018 "Here we\\*(Aqve created a reference to an anonymous array of three elements "
3019 "whose final element is itself a reference to another anonymous array of "
3020 "three elements. (The multidimensional syntax described later can be used to "
3021 "access this. For example, after the above, CW<\\*(C`$arrayref-E<gt>[2]"
3022 "[1]\\*(C'> would have the value \"b\".)"
3023 msgstr ""
3024 "لقد أنشأنا هنا مرجعًا لمصفوفة مجهولة مكونة من ثلاثة عناصر، وعنصرها الأخير هو "
3025 "نفسه مرجع لمصفوفة مجهولة أخرى مكونة من ثلاثة عناصر. (يمكن استخدام الصيغة "
3026 "متعددة الأبعاد الموصوفة لاحقًا للوصول إلى ذلك. على سبيل المثال، بعد ما سبق، "
3027 "ستكون قيمة CW<\\*(C`$arrayref-E<gt>[2][1]\\*(C'> هي \"b\".)"
3028
3029 #. type: Plain text
3030 #: fedora-44 fedora-rawhide mageia-cauldron opensuse-leap-16-1
3031 #: opensuse-tumbleweed
3032 msgid ""
3033 "Taking a reference to an enumerated list is not the same as using square "
3034 "brackets--instead it\\*(Aqs the same as creating a list of references!"
3035 msgstr ""
3036 "أخذ مرجع لقائمة معدودة ليس مثل استخدام الأقواس المربعة -- بدلاً من ذلك، هو "
3037 "نفس إنشاء قائمة من المراجع!"
3038
3039 #. type: Plain text
3040 #: fedora-44 fedora-rawhide mageia-cauldron opensuse-leap-16-1
3041 #: opensuse-tumbleweed
3042 msgid ""
3043 "Because curly brackets (braces) are used for several other things including "
3044 "BLOCKs, you may occasionally have to disambiguate braces at the beginning of "
3045 "a statement by putting a CW<\\*(C`+\\*(C'> or a CW<\\*(C`return\\*(C'> in "
3046 "front so that Perl realizes the opening brace isn\\*(Aqt starting a BLOCK. "
3047 "The economy and mnemonic value of using curlies is deemed worth this "
3048 "occasional extra hassle."
3049 msgstr ""
3050 "نظرًا لأن الأقواس المتعرجة (braces) تُستخدم لأشياء أخرى متعددة بما في ذلك "
3051 "الكتل (BLOCKs)، فقد تضطر أحيانًا إلى إزالة اللبس عن الأقواس في بداية الجملة "
3052 "بوضع CW<\\*(C`+\\*(C'> أو CW<\\*(C`return\\*(C'> في المقدمة حتى يدرك بيرل أن "
3053 "القوس الافتتاحي لا يبدأ كتلة (BLOCK). وتُعتبر القيمة الاقتصادية والتذكارية "
3054 "لاستخدام الأقواس المتعرجة تستحق هذا العناء الإضافي العرضي."
3055
3056 #. type: Plain text
3057 #: fedora-44 fedora-rawhide mageia-cauldron opensuse-leap-16-1
3058 #: opensuse-tumbleweed
3059 msgid ""
3060 "Note the semicolon. Except for the code inside not being immediately "
3061 "executed, a CW<\\*(C`sub {}\\*(C'> is not so much a declaration as it is an "
3062 "operator, like CW<\\*(C`do{}\\*(C'> or CW<\\*(C`eval{}\\*(C'>. (However, no "
3063 "matter how many times you execute that particular line (unless you\\*(Aqre "
3064 "in an \\&CW<eval(\"...\")>), CW<$coderef> will still have a reference to the "
3065 "I<same> anonymous subroutine.)"
3066 msgstr ""
3067 "لاحظ الفاصلة المنقوطة. باستثناء أن الكود الموجود بالداخل لا يُنفذ على الفور، "
3068 "فإن CW<\\*(C`sub {}\\*(C'> لا يُعد تصريحًا بقدر ما هو معامل، مثل "
3069 "CW<\\*(C`do{}\\*(C'> أو CW<\\*(C`eval{}\\*(C'>. (ومع ذلك، بغض النظر عن عدد "
3070 "مرات تنفيذ هذا السطر المحدد (ما لم تكن في \\&CW<eval(\"...\")>)، سيظل لدى "
3071 "CW<$coderef> مرجع لنفس الدالة الفرعية المجهولة I<نفسها>.)"
3072
3073 #. type: Plain text
3074 #: fedora-44 fedora-rawhide mageia-cauldron opensuse-leap-16-1
3075 #: opensuse-tumbleweed
3076 msgid ""
3077 "Anonymous subroutines act as closures with respect to B<my()> variables, "
3078 "that is, variables lexically visible within the current scope. Closure is a "
3079 "notion out of the Lisp world that says if you define an anonymous function "
3080 "in a particular lexical context, it pretends to run in that context even "
3081 "when it\\*(Aqs called outside the context."
3082 msgstr ""
3083 "تعمل الدوال الفرعية المجهولة كإغلاقات (closures) فيما يتعلق بمتغيرات "
3084 "B<my()>، أي المتغيرات المرئية معجميًا ضمن النطاق الحالي. الإغلاق هو مفهوم من "
3085 "عالم Lisp يقول إنه إذا عرفت دالة مجهولة في سياق معجمي معين، فإنها تتظاهر "
3086 "بالعمل في ذلك السياق حتى عندما تُستدعى خارج السياق."
3087
3088 #. type: Plain text
3089 #: fedora-44 fedora-rawhide mageia-cauldron opensuse-leap-16-1
3090 #: opensuse-tumbleweed
3091 msgid ""
3092 "In human terms, it\\*(Aqs a funny way of passing arguments to a subroutine "
3093 "when you define it as well as when you call it. It\\*(Aqs useful for "
3094 "setting up little bits of code to run later, such as callbacks. You can "
3095 "even do object-oriented stuff with it, though Perl already provides a "
3096 "different mechanism to do that--see perlobj."
3097 msgstr ""
3098 "بالمصطلحات البشرية، إنها طريقة مضحكة لتمرير الوسائط إلى دالة فرعية عند "
3099 "تعريفها وكذلك عند استدعائها. وهي مفيدة لإعداد أجزاء صغيرة من الكود لتعمل "
3100 "لاحقًا، مثل ردود النداء (callbacks). يمكنك حتى القيام بأشياء موجهة للكائنات "
3101 "بها، على الرغم من أن بيرل يوفر بالفعل آلية مختلفة للقيام بذلك -- انظر "
3102 "perlobj."
3103
3104 #. type: Plain text
3105 #: fedora-44 fedora-rawhide mageia-cauldron opensuse-leap-16-1
3106 #: opensuse-tumbleweed
3107 msgid ""
3108 "You might also think of closure as a way to write a subroutine template "
3109 "without using B<eval()>. Here\\*(Aqs a small example of how closures work:"
3110 msgstr ""
3111 "قد تفكر أيضًا في الإغلاق كطريقة لكتابة قالب دالة فرعية دون استخدام B<eval()>. "
3112 "إليك مثال صغير لكيفية عمل الإغلاقات:"
3113
3114 #. type: Plain text
3115 #: fedora-44 fedora-rawhide mageia-cauldron opensuse-leap-16-1
3116 #: opensuse-tumbleweed
3117 msgid ""
3118 "Note particularly that CW<$x> continues to refer to the value passed into "
3119 "B<newprint()> I<despite> \"my CW<$x>\" having gone out of scope by the time "
3120 "the anonymous subroutine runs. That\\*(Aqs what a closure is all about."
3121 msgstr ""
3122 "لاحظ بشكل خاص أن CW<$x> يستمر في الإشارة إلى القيمة الممررة إلى "
3123 "B<newprint()> I<على الرغم من> خروج \"my CW<$x>\" من النطاق بحلول وقت تشغيل "
3124 "الدالة الفرعية المجهولة. هذا هو جوهر الإغلاق."
3125
3126 #. type: Plain text
3127 #: fedora-44 fedora-rawhide mageia-cauldron opensuse-leap-16-1
3128 #: opensuse-tumbleweed
3129 msgid ""
3130 "References are often returned by special subroutines called constructors. "
3131 "Perl objects are just references to a special type of object that happens to "
3132 "know which package it\\*(Aqs associated with. Constructors are just special "
3133 "subroutines that know how to create that association. They do so by "
3134 "starting with an ordinary reference, and it remains an ordinary reference "
3135 "even while it\\*(Aqs also being an object. Constructors are often named "
3136 "CW<new()>. You I<can> call them indirectly:"
3137 msgstr ""
3138 "غالبًا ما تُعاد المراجع بواسطة دوال فرعية خاصة تسمى المنشئات (constructors). "
3139 "كائنات بيرل هي مجرد مراجع لنوع خاص من الكائنات التي تعرف بالصدفة الحزمة "
3140 "المرتبطة بها. المنشئات هي مجرد دوال فرعية خاصة تعرف كيفية إنشاء هذا "
3141 "الارتباط. وهي تفعل ذلك من خلال البدء بمرجع عادي، ويظل مرجعًا عاديًا حتى عندما "
3142 "يكون كائنًا أيضًا. غالبًا ما تُسمى المنشئات CW<new()>. I<يمكنك> استدعاؤها بشكل "
3143 "غير مباشر:"
3144
3145 #. type: Plain text
3146 #: fedora-44 fedora-rawhide mageia-cauldron opensuse-leap-16-1
3147 #: opensuse-tumbleweed
3148 msgid ""
3149 "But that can produce ambiguous syntax in certain cases, so it\\*(Aqs often "
3150 "better to use the direct method invocation approach:"
3151 msgstr ""
3152 "ولكن يمكن أن ينتج عن ذلك صيغة غامضة في حالات معينة، لذا غالبًا ما يكون من "
3153 "الأفضل استخدام نهج استدعاء الطريقة المباشر:"
3154
3155 #. type: Plain text
3156 #: fedora-44 fedora-rawhide mageia-cauldron opensuse-leap-16-1
3157 #: opensuse-tumbleweed
3158 msgid ""
3159 "References of the appropriate type can spring into existence if you "
3160 "dereference them in a context that assumes they exist. Because we "
3161 "haven\\*(Aqt talked about dereferencing yet, we can\\*(Aqt show you any "
3162 "examples yet."
3163 msgstr ""
3164 "يمكن للمراجع من النوع المناسب أن تظهر للوجود إذا قمت بفك مراجعها في سياق "
3165 "يفترض وجودها. ولأننا لم نتحدث عن فك المراجع بعد، فلا يمكننا عرض أي أمثلة لك "
3166 "بعد."
3167
3168 #. type: Plain text
3169 #: fedora-44 fedora-rawhide mageia-cauldron opensuse-leap-16-1
3170 #: opensuse-tumbleweed
3171 msgid ""
3172 "\\&CW<*foo{THING}> returns undef if that particular THING hasn\\*(Aqt been "
3173 "used yet, except in the case of scalars. CW<*foo{SCALAR}> returns a "
3174 "reference to an anonymous scalar if CW<$foo> hasn\\*(Aqt been used yet. "
3175 "This might change in a future release."
3176 msgstr ""
3177 "يعيد \\&CW<*foo{THING}> القيمة undef إذا لم يُستخدم هذا الـ THING المعين بعد، "
3178 "باستثناء حالة المتغيرات المفردة (scalars). يعيد CW<*foo{SCALAR}> مرجعًا "
3179 "لمتغير مفرد مجهول إذا لم يُستخدم CW<$foo> بعد. قد يتغير هذا في إصدار مستقبلي."
3180
3181 #. type: Plain text
3182 #: fedora-44 fedora-rawhide mageia-cauldron opensuse-leap-16-1
3183 #: opensuse-tumbleweed
3184 msgid ""
3185 "\\&CW<*foo{IO}> is an alternative to the CW<*HANDLE> mechanism given in "
3186 "\"Typeglobs and Filehandles\" in perldata for passing filehandles into or "
3187 "out of subroutines, or storing into larger data structures. Its "
3188 "disadvantage is that it won\\*(Aqt create a new filehandle for you. Its "
3189 "advantage is that you have less risk of clobbering more than you want to "
3190 "with a typeglob assignment. (It still conflates file and directory handles, "
3191 "though.) However, if you assign the incoming value to a scalar instead of a "
3192 "typeglob as we do in the examples below, there\\*(Aqs no risk of that "
3193 "happening."
3194 msgstr ""
3195 "\\&CW<*foo{IO}> هو بديل لآلية CW<*HANDLE> الواردة في \"Typeglobs and "
3196 "Filehandles\" في perldata لتمرير مقابض الملفات إلى الدوال الفرعية أو منها، "
3197 "أو تخزينها في هياكل بيانات أكبر. عيبه هو أنه لن ينشئ مقبض ملف جديد لك. "
3198 "وميزته هي أن هناك خطرًا أقل لإتلاف أكثر مما تريد باستخدام إسناد typeglob. "
3199 "(ومع ذلك، فإنه لا يزال يخلط بين مقابض الملفات والدلائل.) ولكن إذا أسندت "
3200 "القيمة الواردة إلى متغير مفرد بدلاً من typeglob كما نفعل في الأمثلة أدناه، "
3201 "فلا يوجد خطر لحدوث ذلك."
3202
3203 #. type: Plain text
3204 #: fedora-44 fedora-rawhide mageia-cauldron opensuse-leap-16-1
3205 #: opensuse-tumbleweed
3206 msgid ""
3207 "That\\*(Aqs it for creating references. By now you\\*(Aqre probably dying "
3208 "to know how to use references to get back to your long-lost data. There are "
3209 "several basic methods."
3210 msgstr ""
3211 "هذا كل ما في الأمر بخصوص إنشاء المراجع. بحلول الآن، ربما تتوق لمعرفة كيفية "
3212 "استخدام المراجع لاستعادة بياناتك المفقودة منذ زمن طويل. هناك عدة طرق أساسية."
3213
3214 #. type: Plain text
3215 #: fedora-44 fedora-rawhide mageia-cauldron opensuse-leap-16-1
3216 #: opensuse-tumbleweed
3217 msgid ""
3218 "Anywhere you\\*(Aqd put an identifier (or chain of identifiers) as part of a "
3219 "variable or subroutine name, you can replace the identifier with a simple "
3220 "scalar variable containing a reference of the correct type:"
3221 msgstr ""
3222 "في أي مكان تضع فيه معرفًا (أو سلسلة من المعرفات) كجزء من اسم متغير أو دالة "
3223 "فرعية، يمكنك استبدال المعرف بمتغير مفرد بسيط يحتوي على مرجع من النوع الصحيح:"
3224
3225 #. type: Plain text
3226 #: fedora-44 fedora-rawhide mageia-cauldron opensuse-leap-16-1
3227 #: opensuse-tumbleweed
3228 msgid ""
3229 "It\\*(Aqs important to understand that we are specifically I<not> "
3230 "dereferencing \\&CW<$arrayref[0]> or CW<$hashref{\"KEY\"}> there. The "
3231 "dereference of the scalar variable happens I<before> it does any key "
3232 "lookups. Anything more complicated than a simple scalar variable must use "
3233 "methods 2 or 3 below. However, a \"simple scalar\" includes an identifier "
3234 "that itself uses method 1 recursively. Therefore, the following prints "
3235 "\"howdy\"."
3236 msgstr ""
3237 "من المهم فهم أننا لا نقوم بفك مراجع \\&CW<$arrayref[0]> أو "
3238 "CW<$hashref{\"KEY\"}> هناك تحديدًا. يحدث فك مراجع المتغير المفرد I<قبل> "
3239 "القيام بأي عمليات بحث عن المفاتيح. وأي شيء أكثر تعقيدًا من متغير مفرد بسيط "
3240 "يجب أن يستخدم الطريقة 2 أو 3 أدناه. ومع ذلك، فإن \"المتغير المفرد البسيط\" "
3241 "يشمل المعرف الذي يستخدم الطريقة 1 بشكل تكراري. لذلك، فإن ما يلي يطبع "
3242 "\"howdy\"."
3243
3244 #. type: Plain text
3245 #: fedora-44 fedora-rawhide mageia-cauldron opensuse-leap-16-1
3246 #: opensuse-tumbleweed
3247 msgid ""
3248 "Anywhere you\\*(Aqd put an identifier (or chain of identifiers) as part of a "
3249 "variable or subroutine name, you can replace the identifier with a BLOCK "
3250 "returning a reference of the correct type. In other words, the previous "
3251 "examples could be written like this:"
3252 msgstr ""
3253 "في أي مكان تضع فيه معرفًا (أو سلسلة من المعرفات) كجزء من اسم متغير أو دالة "
3254 "فرعية، يمكنك استبدال المعرف بكتلة (BLOCK) تعيد مرجعًا من النوع الصحيح. بمعنى "
3255 "آخر، يمكن كتابة الأمثلة السابقة على النحو التالي:"
3256
3257 #. type: Plain text
3258 #: fedora-44 fedora-rawhide mageia-cauldron opensuse-leap-16-1
3259 #: opensuse-tumbleweed
3260 msgid ""
3261 "Admittedly, it\\*(Aqs a little silly to use the curlies in this case, but "
3262 "the BLOCK can contain any arbitrary expression, in particular, subscripted "
3263 "expressions:"
3264 msgstr ""
3265 "باعتراف الجميع، من السخف قليلاً استخدام الأقواس المتعرجة في هذه الحالة، ولكن "
3266 "يمكن أن تحتوي الكتلة (BLOCK) على أي تعبير عشوائي، لا سيما التعبيرات المفهرسة:"
3267
3268 #. type: Plain text
3269 #: fedora-44 fedora-rawhide mageia-cauldron opensuse-leap-16-1
3270 #: opensuse-tumbleweed
3271 msgid ""
3272 "Because of being able to omit the curlies for the simple case of CW<$$x>, "
3273 "people often make the mistake of viewing the dereferencing symbols as proper "
3274 "operators, and wonder about their precedence. If they were, though, you "
3275 "could use parentheses instead of braces. That\\*(Aqs not the case. "
3276 "Consider the difference below; case 0 is a short-hand version of case 1, "
3277 "\\&I<not> case 2:"
3278 msgstr ""
3279 "بسبب القدرة على حذف الأقواس المتعرجة في الحالة البسيطة لـ CW<$$x>، غالبًا ما "
3280 "يخطئ الناس في اعتبار رموز فك المراجع معاملات حقيقية، ويتساءلون عن أسبقيتها. "
3281 "لو كانت كذلك، لكان بإمكانك استخدام الأقواس العادية بدلاً من الأقواس المتعرجة. "
3282 "الأمر ليس كذلك. تأمل الفرق أدناه؛ الحالة 0 هي نسخة مختصرة من الحالة 1، "
3283 "\\&I<وليس> الحالة 2:"
3284
3285 #. type: Plain text
3286 #: fedora-44 fedora-rawhide mageia-cauldron opensuse-leap-16-1
3287 #: opensuse-tumbleweed
3288 msgid ""
3289 "Case 2 is also deceptive in that you\\*(Aqre accessing a variable called "
3290 "CW<%hashref>, not dereferencing through CW<$hashref> to the hash it\\*(Aqs "
3291 "presumably referencing. That would be case 3."
3292 msgstr ""
3293 "الحالة 2 مخادعة أيضًا من حيث أنك تصل إلى متغير يسمى CW<%hashref>، وليس فك "
3294 "المراجع عبر CW<$hashref> إلى المجموعة المترابطة التي يفترض أنه يشير إليها. "
3295 "سيكون ذلك هو الحالة 3."
3296
3297 #. type: Plain text
3298 #: fedora-44 fedora-rawhide mageia-cauldron opensuse-leap-16-1
3299 #: opensuse-tumbleweed
3300 msgid ""
3301 "This is one of the cases we mentioned earlier in which references could "
3302 "spring into existence when in an lvalue context. Before this statement, "
3303 "CW<$array[$x]> may have been undefined. If so, it\\*(Aqs automatically "
3304 "defined with a hash reference so that we can look up "
3305 "\\&CW<\\*(C`{\"foo\"}\\*(C'> in it. Likewise CW<\\*(C`$array[$x]-"
3306 "E<gt>{\"foo\"}\\*(C'> will automatically get defined with an array reference "
3307 "so that we can look up CW<\\*(C`[0]\\*(C'> in it. This process is called "
3308 "I<autovivification>."
3309 msgstr ""
3310 "هذه إحدى الحالات التي ذكرناها سابقًا حيث يمكن للمراجع أن تنبثق إلى الوجود "
3311 "عندما تكون في سياق القيمة اليسارية (lvalue). قبل هذه العبارة، قد يكون "
3312 "CW<$array[$x]> غير معرف. إذا كان الأمر كذلك، فإنه يُعرف آليًا بمرجع هش حتى "
3313 "نتمكن من البحث عن CW<\\*(C`{\"foo\"}\\*(C'> بداخله. وبالمثل، سيُعرف "
3314 "CW<\\*(C`$array[$x]-E<gt>{\"foo\"}\\*(C'> آليًا بمرجع مصفوفة حتى نتمكن من "
3315 "البحث عن CW<\\*(C`[0]\\*(C'> بداخله. تسمى هذه العملية I<التنشيط التلقائي> "
3316 "(autovivification)."
3317
3318 #. type: Plain text
3319 #: fedora-44 fedora-rawhide mageia-cauldron opensuse-leap-16-1
3320 #: opensuse-tumbleweed
3321 msgid ""
3322 "Which, in the degenerate case of using only ordinary arrays, gives you "
3323 "multidimensional arrays just like C\\*(Aqs:"
3324 msgstr ""
3325 "والذي يمنحك، في الحالة البسيطة لاستخدام المصفوفات العادية فقط، مصفوفات "
3326 "متعددة الأبعاد تمامًا مثل لغة C:"
3327
3328 #. type: Plain text
3329 #: fedora-44 fedora-rawhide mageia-cauldron opensuse-leap-16-1
3330 #: opensuse-tumbleweed
3331 msgid ""
3332 "Well, okay, not entirely like C\\*(Aqs arrays, actually. C doesn\\*(Aqt "
3333 "know how to grow its arrays on demand. Perl does."
3334 msgstr ""
3335 "حسنًا، ليس تمامًا مثل مصفوفات C في الواقع. لا تعرف لغة C كيفية تنمية مصفوفاتها "
3336 "عند الطلب. أما بيرل فيعرف."
3337
3338 #. type: Plain text
3339 #: fedora-44 fedora-rawhide mageia-cauldron opensuse-leap-16-1
3340 #: opensuse-tumbleweed
3341 msgid ""
3342 "If a reference happens to be a reference to an object, then there are "
3343 "probably methods to access the things referred to, and you should probably "
3344 "stick to those methods unless you\\*(Aqre in the class package that defines "
3345 "the object\\*(Aqs methods. In other words, be nice, and don\\*(Aqt violate "
3346 "the object\\*(Aqs encapsulation without a very good reason. Perl does not "
3347 "enforce encapsulation. We are not totalitarians here. We do expect some "
3348 "basic civility though."
3349 msgstr ""
3350 "إذا صادف أن يكون المرجع مرجعًا لكائن، فمن المحتمل أن تكون هناك طرق للوصول إلى "
3351 "الأشياء المشار إليها، ويجب عليك على الأرجح الالتزام بتلك الطرق ما لم تكن في "
3352 "حزمة الفئة (class package) التي تعرف طرق الكائن. بعبارة أخرى، كن لطيفًا ولا "
3353 "تنتهك تغليف الكائن دون سبب وجيه للغاية. لا يفرض بيرل التغليف. نحن لسنا "
3354 "استبداديين هنا. لكننا نتوقع بعض الكياسة الأساسية."
3355
3356 #. type: Plain text
3357 #: fedora-44 fedora-rawhide mageia-cauldron opensuse-leap-16-1
3358 #: opensuse-tumbleweed
3359 msgid ""
3360 "Using a reference as a string produces both its referent\\*(Aqs type, "
3361 "including any package blessing as described in perlobj, as well as the "
3362 "numeric address expressed in hex. The B<ref()> operator returns just the "
3363 "type of thing the reference is pointing to, without the address. See "
3364 "\"ref\" in perlfunc for details and examples of its use."
3365 msgstr ""
3366 "ينتج عن استخدام المرجع كسلسلة نصية كل من نوع المرجع إليه، بما في ذلك أي "
3367 "مباركة حزمة (package blessing) كما هو موصوف في perlobj، بالإضافة إلى العنوان "
3368 "العددي المعبر عنه بالقيم الست عشرية. يعيد معامل B<ref()> فقط نوع الشيء الذي "
3369 "يشير إليه المرجع، بدون العنوان. انظر \"ref\" في perlfunc لمزيد من التفاصيل "
3370 "وأمثلة على استخدامه."
3371
3372 #. type: Plain text
3373 #: fedora-44 fedora-rawhide mageia-cauldron opensuse-leap-16-1
3374 #: opensuse-tumbleweed
3375 msgid "Here\\*(Aqs a trick for interpolating a subroutine call into a string:"
3376 msgstr "إليك حيلة لاستكمال استدعاء دالة فرعية داخل سلسلة نصية:"
3377
3378 #. type: Plain text
3379 #: fedora-44 fedora-rawhide mageia-cauldron opensuse-leap-16-1
3380 #: opensuse-tumbleweed
3381 msgid ""
3382 "The way it works is that when the CW<\\*(C`@{...}\\*(C'> is seen in the "
3383 "double-quoted string, it\\*(Aqs evaluated as a block. The block creates a "
3384 "reference to an anonymous array containing the results of the call to "
3385 "CW<\\*(C`mysub(1,2,3)\\*(C'>. So the whole block returns a reference to an "
3386 "array, which is then dereferenced by CW<\\*(C`@{...}\\*(C'> and stuck into "
3387 "the double-quoted string. This chicanery is also useful for arbitrary "
3388 "expressions:"
3389 msgstr ""
3390 "طريقة عملها هي أنه عندما تظهر CW<\\*(C`@{...}\\*(C'> في السلسلة المقتبسة "
3391 "اقتباسًا مزدوجًا، فإنها تُقيم ككتلة. تنشئ الكتلة مرجعًا لمصفوفة مجهولة تحتوي على "
3392 "نتائج الاستدعاء لـ CW<\\*(C`mysub(1,2,3)\\*(C'>. لذا فإن الكتلة بأكملها تعيد "
3393 "مرجعًا لمصفوفة، والتي تُفك مراجعها بعد ذلك بواسطة CW<\\*(C`@{...}\\*(C'> وتُدرج "
3394 "في السلسلة المقتبسة مزدوجًا. هذه الحيلة مفيدة أيضًا للتعبيرات العشوائية:"
3395
3396 #. type: Plain text
3397 #: fedora-44 fedora-rawhide mageia-cauldron opensuse-leap-16-1
3398 #: opensuse-tumbleweed
3399 msgid ""
3400 "Because objects in Perl are implemented as references, it\\*(Aqs possible to "
3401 "have circular references with objects as well. Imagine a TreeNode class "
3402 "where each node references its parent and child nodes. Any node with a "
3403 "parent will be part of a circular reference."
3404 msgstr ""
3405 "نظرًا لأن الكائنات في بيرل تُنفذ كمراجع، فمن الممكن وجود مراجع دائرية مع "
3406 "الكائنات أيضًا. تخيل فئة TreeNode حيث يشير كل عقدة إلى عقدها الأب والأبناء. "
3407 "أي عقدة لها أب ستكون جزءًا من مرجع دائري."
3408
3409 #. type: Plain text
3410 #: fedora-44 fedora-rawhide mageia-cauldron opensuse-leap-16-1
3411 #: opensuse-tumbleweed
3412 msgid "Here\\*(Aqs how we can make the first example safer:"
3413 msgstr "إليك كيف يمكننا جعل المثال الأول أكثر أمانًا:"
3414
3415 #. type: Plain text
3416 #: fedora-44 fedora-rawhide mageia-cauldron opensuse-leap-16-1
3417 #: opensuse-tumbleweed
3418 msgid ""
3419 "We said that references spring into existence as necessary if they are "
3420 "undefined, but we didn\\*(Aqt say what happens if a value used as a "
3421 "reference is already defined, but I<isn\\*(Aqt> a hard reference. If you "
3422 "use it as a reference, it\\*(Aqll be treated as a symbolic reference. That "
3423 "is, the value of the scalar is taken to be the I<name> of a variable, rather "
3424 "than a direct link to a (possibly) anonymous value."
3425 msgstr ""
3426 "قلنا إن المراجع تظهر للوجود حسب الضرورة إذا كانت غير محددة، لكننا لم نقل "
3427 "ماذا يحدث إذا كانت القيمة المستخدمة كمرجع محددة بالفعل، ولكنها I<ليست> مرجعًا "
3428 "حقيقيًا (hard reference). إذا استخدمتها كمرجع، فستُعامل كمرجع رمزي. أي أن قيمة "
3429 "المتغير المفرد تُعتبر I<اسم> المتغير، بدلاً من كونها رابطًا مباشرًا لقيمة "
3430 "(مجهولة المصدر ربما)."
3431
3432 #. type: Plain text
3433 #: fedora-44 fedora-rawhide mageia-cauldron opensuse-leap-16-1
3434 #: opensuse-tumbleweed
3435 msgid ""
3436 "This is powerful, and slightly dangerous, in that it\\*(Aqs possible to "
3437 "intend (with the utmost sincerity) to use a hard reference, and accidentally "
3438 "use a symbolic reference instead. To protect against that, you can say"
3439 msgstr ""
3440 "هذا أمر قوي، وخطير قليلاً، من حيث أنه من الممكن أن تنوي (بأقصى درجات الإخلاص) "
3441 "استخدام مرجع حقيقي، وتستخدم عن طريق الخطأ مرجعًا رمزيًا بدلاً منه. للحماية من "
3442 "ذلك، يمكنك قول"
3443
3444 #. type: Plain text
3445 #: fedora-44 fedora-rawhide mageia-cauldron opensuse-leap-16-1
3446 #: opensuse-tumbleweed
3447 msgid ""
3448 "Only package variables (globals, even if localized) are visible to symbolic "
3449 "references. Lexical variables (declared with B<my()>) aren\\*(Aqt in a "
3450 "symbol table, and thus are invisible to this mechanism. For example:"
3451 msgstr ""
3452 "متغيرات الحزمة فقط (المتغيرات العامة، حتى لو كانت محلية) هي المرئية للمراجع "
3453 "الرمزية. المتغيرات المعجمية (المصرح عنها باستخدام B<my()>) ليست في جدول "
3454 "الرموز، وبالتالي فهي غير مرئية لهذه الآلية. فعلى سبيل المثال:"
3455
3456 #. type: Plain text
3457 #: fedora-44 fedora-rawhide mageia-cauldron opensuse-leap-16-1
3458 #: opensuse-tumbleweed
3459 msgid ""
3460 "will have the same effect. This construct is I<not> considered to be a "
3461 "symbolic reference when you\\*(Aqre using strict refs:"
3462 msgstr ""
3463 "سيكون له نفس التأثير. هذا البناء I<لا> يعتبر مرجعًا رمزيًا عندما تستخدم strict "
3464 "refs:"
3465
3466 #. type: Plain text
3467 #: fedora-44 fedora-rawhide mageia-cauldron opensuse-leap-16-1
3468 #: opensuse-tumbleweed
3469 msgid ""
3470 "Pseudo-hashes have been removed from Perl. The fields pragma remains "
3471 "available."
3472 msgstr ""
3473 "أُزيلت التجزئات الوهمية (Pseudo-hashes) من بيرل. وما تزال الميزة الإرشادية "
3474 "(pragma) للحقول متاحة."
3475
3476 #. type: Plain text
3477 #: fedora-44 fedora-rawhide mageia-cauldron opensuse-leap-16-1
3478 #: opensuse-tumbleweed
3479 msgid ""
3480 "As explained above, an anonymous function with access to the lexical "
3481 "variables visible when that function was compiled, creates a closure. It "
3482 "retains access to those variables even though it doesn\\*(Aqt get run until "
3483 "later, such as in a signal handler or a Tk callback."
3484 msgstr ""
3485 "كما شُرح أعلاه، تُنشئ الدالة المجهولة التي تملك صلاحية الوصول إلى المتغيرات "
3486 "المعجمية المرئية وقت تصريف تلك الدالة ما يُسمى «غلقة» (closure). حيث تحتفظ "
3487 "بصلاحية الوصول إلى تلك المتغيرات حتى وإن لم تُنفذ إلا لاحقًا، كما هو الحال في "
3488 "معالج إشارات أو استدعاء Tk راجع."
3489
3490 #. type: Plain text
3491 #: fedora-44 fedora-rawhide mageia-cauldron opensuse-leap-16-1
3492 #: opensuse-tumbleweed
3493 msgid ""
3494 "The B<red()> and B<green()> functions would be similar. To create these, "
3495 "we\\*(Aqll assign a closure to a typeglob of the name of the function "
3496 "we\\*(Aqre trying to build."
3497 msgstr ""
3498 "ستكون الدالتان B<red()> و B<green()> مماثلتين. ولإنشائهما، سنخصص «غلقة» إلى "
3499 "typeglob يحمل اسم الدالة التي نحاول بناءها."
3500
3501 #. type: Plain text
3502 #: fedora-44 fedora-rawhide mageia-cauldron opensuse-leap-16-1
3503 #: opensuse-tumbleweed
3504 msgid ""
3505 "Now all those different functions appear to exist independently. You can "
3506 "call B<red()>, B<RED()>, B<blue()>, B<BLUE()>, B<green()>, etc. This "
3507 "technique saves on both compile time and memory use, and is less error-prone "
3508 "as well, since syntax checks happen at compile time. It\\*(Aqs critical "
3509 "that any variables in the anonymous subroutine be lexicals in order to "
3510 "create a proper closure. That\\*(Aqs the reasons for the CW<\\*(C`my\\*(C'> "
3511 "on the loop iteration variable."
3512 msgstr ""
3513 "الآن تبدو كل تلك الدوال المختلفة وكأنها موجودة بشكل مستقل. يمكنك استدعاء "
3514 "B<red()> و B<RED()> و B<blue()> و B<BLUE()> و B<green()>، وما إلى ذلك. توفر "
3515 "هذه التقنية في كل من وقت التصريف واستهلاك الذاكرة، وهي أقل عرضة للأخطاء "
3516 "أيضًا، نظرًا لأن فحص الصياغة يحدث وقت التصريف. ومن الضروري أن تكون أي متغيرات "
3517 "في الروتين الفرعي المجهول معجمية من أجل إنشاء «غلقة» سليمة. وهذا هو السبب "
3518 "وراء استخدام CW<\\*(C`my\\*(C'> في متغير تكرار الحلقة."
3519
3520 #. type: Plain text
3521 #: fedora-44 fedora-rawhide mageia-cauldron opensuse-leap-16-1
3522 #: opensuse-tumbleweed
3523 msgid ""
3524 "Anonymous subroutines get to capture each time you execute the "
3525 "CW<\\*(C`sub\\*(C'> operator, as they are created on the fly. If you are "
3526 "accustomed to using nested subroutines in other programming languages with "
3527 "their own private variables, you\\*(Aqll have to work at it a bit in Perl. "
3528 "The intuitive coding of this type of thing incurs mysterious warnings about "
3529 "\"will not stay shared\" due to the reasons explained above. For example, "
3530 "this won\\*(Aqt work:"
3531 msgstr ""
3532 "تتمكن الروتينات الفرعية المجهولة من الالتقاط في كل مرة تُنفذ فيها عامل "
3533 "CW<\\*(C`sub\\*(C'>، حيث تُنشأ آليًا. إذا كنت معتادًا على استخدام الروتينات "
3534 "الفرعية المتداخلة في لغات برمجة أخرى بمتغيراتها الخاصة، فسيتعين عليك بذل جهد "
3535 "إضافي في بيرل. إن الكتابة البديهية لهذا النوع من الأشياء تتسبب في تحذيرات "
3536 "غامضة حول «لن تظل مشتركة» (will not stay shared) للأسباب الموضحة أعلاه. على "
3537 "سبيل المثال، هذا لن يعمل:"
3538
3539 #. type: Plain text
3540 #: fedora-44 fedora-rawhide mageia-cauldron opensuse-leap-16-1
3541 #: opensuse-tumbleweed
3542 #, no-wrap
3543 msgid ""
3544 "\\& $r = \\e@a;\n"
3545 "\\& @b = $r-E<gt>@*; # equivalent to @$r or @{ $r }\n"
3546 "\\&\n"
3547 "\\& $r = [ 1, [ 2, 3 ], 4 ];\n"
3548 "\\& $r-E<gt>[1]-E<gt>@*; # equivalent to @{ $r-E<gt>[1] }\n"
3549 "\\&\n"
3550 "\\& $aref-E<gt>@* = (1, 2, 3); # same as @{ $aref } = (1, 2, 3)\n"
3551 msgstr ""
3552 "\\& $r = \\e@a;\n"
3553 "\\& @b = $r-E<gt>@*; # مكافئ لـ @$r أو @{ $r }\n"
3554 "\\&\n"
3555 "\\& $r = [ 1, [ 2, 3 ], 4 ];\n"
3556 "\\& $r-E<gt>[1]-E<gt>@*; # مكافئ لـ @{ $r-E<gt>[1] }\n"
3557 "\\&\n"
3558 "\\& $aref-E<gt>@* = (1, 2, 3); # مماثل لـ @{ $aref } = (1, 2, 3)\n"
3559
3560 #. type: SH
3561 #: fedora-44 fedora-rawhide mageia-cauldron opensuse-leap-16-1
3562 #: opensuse-tumbleweed
3563 #, no-wrap
3564 msgid "WARNING: Don\\*(Aqt use references as hash keys"
3565 msgstr "تحذير: لا تستخدم المراجع كمفاتيح للتجزئة"
3566
3567 #. type: Plain text
3568 #: fedora-44 fedora-rawhide mageia-cauldron opensuse-leap-16-1
3569 #: opensuse-tumbleweed
3570 msgid ""
3571 "If you try to dereference the key, it won\\*(Aqt do a hard dereference, and "
3572 "you won\\*(Aqt accomplish what you\\*(Aqre attempting. You might want to do "
3573 "something more like"
3574 msgstr ""
3575 "إذا حاولت إلغاء مرجعية المفتاح، فلن يُنفذ إلغاء مرجعية حقيقي، ولن تحقق ما "
3576 "تحاول القيام به. قد ترغب في القيام بشيء أقرب إلى"
3577
3578 #. type: Plain text
3579 #: fedora-44 fedora-rawhide mageia-cauldron opensuse-leap-16-1
3580 #: opensuse-tumbleweed
3581 msgid ""
3582 "And then at least you can use the B<values()>, which will be real refs, "
3583 "instead of the B<keys()>, which won\\*(Aqt."
3584 msgstr ""
3585 "وعندها على الأقل يمكنك استخدام B<values()>، والتي ستكون مراجع حقيقية، بدلاً "
3586 "من B<keys()>، التي لن تكون كذلك."
3587
3588 #. type: TH
3589 #: fedora-rawhide
3590 #, no-wrap
3591 msgid "2026-03-30"
3592 msgstr "30 مارس 2026"
3593
3594 #. type: TH
3595 #: fedora-rawhide
3596 #, no-wrap
3597 msgid "perl v5.42.2"
3598 msgstr "بيرل v5.40.2"
3599
3600 #. type: TH
3601 #: mageia-cauldron
3602 #, no-wrap
3603 msgid "2025-06-24"
3604 msgstr "24 يونيو 2025"
3605
3606 #. type: TH
3607 #: mageia-cauldron
3608 #, no-wrap
3609 msgid "perl v5.42.0"
3610 msgstr "بيرل v5.42.0"