This file contains Perligata ERA documentation...for Perligata. It has at least one example of every ERA command plus a small section of nested Perligata code. Use the bin/explica script to convert it to readable documentation. ECCE EXPLICO ECCE INTITULO PRIMUM NOMEN Lingua::Romana::Perligata -- Perl in Latin ECCE INTITULO PRIMUM EDITIO This document describes version 0.604 of Lingua::Romana::Perligata ECCE INTITULO PRIMUM SUMMARIUM use Lingua::Romana::Perligata; adnota Illud Cribrum Eratothenis maximum tum val inquementum tum biguttam tum stadium egresso scribe. da meo maximo vestibulo perlegementum. maximum comementum tum novumversum egresso scribe. meis listis conscribementa II tum maximum da. dum damentum nexto listis decapitamentum fac sic lista sic hoc tum nextum recidementum cis vannementa listis da. dictum sic deinde cis tum biguttam tum stadium tum cum nextum comementum tum novumversum scribe egresso. cis ECCE INTITULO PRIMUM DESCRIPTIO ECCE AD DEXTRAM ECCE NUMERO PUNCTUM The Lingua::Romana::Perligata makes it makes it possible to write Perl programs in Latin. ECCE NUMERO PUNCTUM If you have to ask "Why?", then the answer probably won't make any sense to you either. ECCE NUMERO PUNCTUM The linguistic principles behind Perligata are described in: http://www.csse.monash.edu.au/~damian/papers/HTML/Perligata.html ECCE NUMERO PUNCTUM The module is Cd at the start of the program, and installs a filter which allows the rest of the program to be written in (modified) Latin, as described in the following sections. ECCE AD SINISTRAM ECCE SECO use Lingua::Romana::Perligata; MAXIMUM TUM VAL INQUEMENTUM TUM BIGUTTAM TUM STADIUM EGRESSO SCRIBE. MEO MAXIMO VESTIBULO PERLEGEMENTUM DA. MAXIMUM COMEMENTUM TUM NOVUMVERSUM EGRESSO SCRIBE. DA MEIS LISTIS CONSCRIBEMENTA II TUM MAXIMUM. DUM DAMENTUM NEXTO LISTIS DECAPITAMENTUM FAC SIC LISTA SIC HOC TUM NEXTUM RECIDEMENTUM CIS VANNEMENTA LISTIS DA. DICTUM SIC DEINDE CIS TUM BIGUTTAM TUM STADIUM TUM CUM NEXTUM COMEMENTUM TUM NOVUMVERSUM SCRIBE EGRESSO. CIS. ECCE INTITULO PRIMUM GRAMMATICA PERLIGATA Ecce Intitulo Secundum Variables To simplify the mind-numbingly complex rules of declension and conjugation that govern inflexions in Latin, Perligata treats all user-defined scalar and array variables as neuter nouns of the second declension -- singular for scalars, plural for arrays. Hashes represent something of a difficulty in Perligata, as Latin lacks an obvious way of distinguishing these "plural" variables from arrays. The solution that has been adopted is to depart from the second declension and represent hashes as masculine plural nouns of the fourth declension. Hence, the type and role of all types variables are specified by their number and case. When elements of arrays and hashes are referred to directly in Perl, the prefix of the container changes from C<@> or C<%> to C<$>. So it should not be surprising that Perligata also makes use of a different inflexion to distinguish these cases. Indexing operations such as C<$array[$elem]> or C<$hash{$key}> might be translated as "elem of array" or "key of hash". This suggests that when arrays or hashes are indexed, their names should be rendered in the genitive (or possessive) case. Multi-level indexing operations (C<$array[$row][$column]>) mean "column of row of array", and hence the first indexing variable must also be rendered in the genitive. Note that the current release of Perligata only supports homogeneous multi-level indexing. That is: C<$lol[$row][$column]> or C<$hoh{key}{subkey}{subsubkey}>, but not C<$lohol[$index1]{key}[$index2]>. The rules for specifying variables may be summarized as follows: Perligata Number, Case, and Declension Perl Role ========= ============================ ==== ==== nextum accusative singular 2nd $next scalar rvalue nexta accusative plural 2nd @next array rvalue nextus accusative plural 4th %next hash rvalue nexto dative singular 2nd $next scalar lvalue nextis dative plural 2nd @next array lvalue nextibus dative plural 4th %next hash lvalue nexti genitive singular 2nd [$next]... scalar index nextorum genitive plural 2nd $next[...] array element nextuum genitive plural 4th $next{...} hash entry In other words, scalars are always singular nouns, arrays and hashes are always plural (but of different declensions), and the case of the noun specifies its syntactic role in a statement: accusative for an rvalue, dative for an lvalue, genitive when being an index. Of course, because the inflection determines the syntactic role, the various components of a statement can be given in any order. For example, the Perl statement: $last = $next; could be expressed in Perligata as any of the following (C is the Perligata assignment operator -- see L<"Built-in functions and operators">): lasto da nextum. lasto nextum da. nextum da lasto. nextum lasto da. da lasto nextum. da nextum lasto. ECCE INTITULO TERTIUM Special variables ECCE INTITULO QUARTUM Array length The special form C<$#array> is rendered via the Perligata verb I ("measure out"). See L<"Subroutines, operators, and functions">. ECCE INTITULO QUARTUM "Underscore" variables The common punctuation variables C<$_> and C<@_> are special cases. C<$_> is often the value under implicit consideration (e.g. in pattern matches, or C loops) and so it is rendered as "this thing": I as an rvalue, I as an lvalue, I used as an intermediate index. Similarly, C<@_> is implicitly the list of things passed into a subroutine, and so is rendered as "these things": I as an rvalue, I as an lvalue, I when indexed. ECCE INTITULO QUARTUM Other special variables Other punctuation variables take the Latin forms of their English.pm equivalents (see L<"THESAURUS PERLIGATUS">), often with a large measure of poetic licence. For example, in Perligata, C<$/> is rendered as I or "gatekeeper". Ecce Intitulo Quintum Regex Capture variables The "numeral" variables -- C<$1>, C<$2>, etc. -- are rendered as synthetic compounds: I ("the equal of the first"), I ("the equal of the second"), etc. When used as interim indices, they take their genitive forms: I, I, etc. Since they cannot be used as an lvalue, they have no dative forms. Ecce intitulo sextum A numeric variable that I a regex capture variable The one exception is C<$0> (the variable storing the name of the current program), which is I in the accusative and I in the dative. It also has a genitive form (I), though it's hard to imagine ever needing that. Ecce Intitulo Quintum Program parameters The parameter variable (C<@ARGV>) is rendered as I in the accusative, I in the dative, and I in the genetive. Its related filehandle (C<*ARGV>) is always dative singular: I Ecce Intitulo Secundum C, C, and C In Perligata, the C modifier is rendered -- not surprisingly -- by the first person possessive pronouns: I (conferring a scalar context) and I (for a list context). Note that the modifier is always applied to a dative (lvalue), and hence is itself declined in that case. Thus: meo varo haec da. # my $var = @_; meis varo haec da. # my ($var) = @_; meis varis haec da. # my @var = @_; Similarly the C modifier is rendered as I or I, depending on the desired context. The Perl C modifier is I or I in Perligata: loco varo haec da. # local $var = @_; locis varo haec da. # local ($var) = @_; locis varis haec da. # local @var = @_; This is particularly felicitous: not only is I the Latin term from which the word "local" derives, it also means "in place of" (as in: I). This meaning is much closer to the actual behaviour of the C modifier, namely to temporarily install a new symbol table entry in place of the current one. Ecce Intitulo Secundum Subroutines, operators, and functions Functions, operators, and user-defined subroutines are represented as verbs or, in some situations, verbal nouns. The inflexion of the verb determines not only its syntactic role, but also its call context. User-defined subroutines are the simplest group. To avoid ambiguities, they are all treated as verbs of the third conjugation. For example, here are the various conjugations for different usages for a user-defined subroutine C: Perligata Number, Mood, etc Perl Role Context ========= ================= ==== ==== ======= countere infinitive sub count defn - counte imperative sing. count() call void countementum acc. sing. resultant count() call scalar countementa acc. plur. resultant count() call list countemento dat. sing. resultant count() call scalar lvalue countementis dat. plur. resultant count() call list lvalue The use of the infinitive as a subroutine definition is obvious: I would tell Perligata how "to accept"; I, how "to reject". So I specifies how "to count". The use of the imperative for void context is also straightforward: I commands Perligata to "accept!", I tells it to "reject!", and I bids it "count!". In each case, an instruction is being given (and in a void context too, so no backchat is expected). Handling scalar and list contexts is a little more challenging. The corresponding Latin must still have verbal properties, since an action is being performed upon objects. But it must also have the characteristics of a noun, since the result of the call will itself be used as the object (i.e. target or data) of some other verb. Fortunately, Latin has a rich assortment of verbal nouns -- far more than English -- that could fill this role. Since it is the result of the subroutine call that is of interest here, the chosen solution was to use the I<-ementum> suffix, which specifies the (singular, accusative) outcome of an action. This corresponds to the result of a subroutine called in a scalar context and used as data. For a list data context, the plural suffix I<-ementa> is used, and for targets, the dative forms are used: I<-emento> and I<-ementis>. Of course, Perl does not (yet) support lvalue subroutines that return a list/array, so the I<-mentis> suffix currently triggers an error. Note that these resultative endings are completely consistent with those for variables. Ecce Intitulo Secundum Built-in functions and operators Built-in operators and functions could have followed the same "dog-latin" pattern as subroutines. For example C might have been I in a void context, I when used as data in an array context, I when used as a target in a scalar context, etc. However, Latin already has a perfectly good verb with the same meaning as C: I ("to behead"). Unfortunately, this verb is of the first conjugation, not the second, and hence has the imperative form I, which makes it look like a Perligata array in a data role. Orthogonality has never been Perl's highest design criterion, so Perligata follows suit by eschewing bland consistency in favour of aesthetics. All Perligata keywords -- including function and operator names -- are therefore specified as correct Latin verbs, of whatever conjugation is required. For example: Operator/ Literal In void When used as When used as function meaning context scalar rvalue list rvalue ======== ======= ======= ============= ============ + "add" adde addementum addementa = "give" da damentum damenta . "conjoin" sere serementum serementa .. "enlist" conscribe conscribementum conscribementa shift "behead" decapita decapitamentum decapitamenta push "stack" cumula cumulamentum cumulamenta pop "unstack" decumula decumulamentum decumulamenta grep "winnow" vanne vannementum vannementa print "write" scribe scribementum scribementa write "write below" subscribe subscribementum subscribementa die "die" mori morimentum morimenta The full list of Perligata keywords is provided in L. Note, however, that consistency has not been entirely forsaken. The back-formations of inflexions for scalar and list context are entirely regular, and consistent with those for user-defined subroutines (described above). A few Perl built-in functions -- C, C, C -- can be used as lvalues. That is, they can be the target of some other action (typically of an assignment). In Perligata such cases are written in the dative singular (since the lvalues are always scalar). Note too that, because an assignment to an lvalue function modifies its first argument, that argument must be a target too, and hence must be written in the dative as well. Thus: nexto stringum reperimentum da. # $next = pos $string; nextum stringo reperimento da. # pos $string = $next; inserto stringum tum unum tum duo excerpementum da. # $insert = substr($string,1,2); insertum stringo unum tum duo excerpemento da. # substr($string,1,2) = $insert; clavis hashus nominamentum da. # @keys = keys %hash; clava hashibus nominamento da. # keys %hash = @keys; An interesting special case is the C<$#array> construction, which in Perligata is rendered via the verb I: counto da arraya admetamentum. # $count = $#array; Ecce Intitulo Secundum Comments In Perligata, comments are rendered by the verb I ("annotate") and extend until the end of the line. For example: nexto da prevum. adnota mensuram antiquam reserva means: $next = $prev; # remember old amount Ecce Intitulo Secundum Imposing precedence on argument lists The order-independence of argument lists and subroutine calls largely makes up for the lack of bracketing in Perligata. For example, the Perl statement: $res = foo(bar($xray,$yell),$zip); can be written: reso da xrayum tum yellum barmentum tum zipum foomentum. Note that the lack of argument list brackets in Perligata means that if it were written: reso da foomentum barmentum xrayum tum yellum tum zipum. it would be equivalent to: $res = foo(bar($xray,$yell,$zip)); instead. Likewise, it is possible to translate: $res = foo($xray,bar($yell,$zip)); like so: reso da xrayum tum barmentum yellum tum zipum foomentum. But translating: $res = foo($weld,bar($xray,$yell),$zip); presents a difficulty. In the first example above (I), the verb I was used as a suffix on I -- to keep the variable I out of the argument list of the call to C. In the second example (I), the verb I was used as a prefix on I -- to keep the variable I out of the argument list. But in this third example, it's necessary to keep both I and I out of C's argument list. Unfortunately, I can't be both a prefix (to isolate I) and a suffix (to isolate I) simultaneously. The solution is to use the preposition I (meaning "with...") at the start of C's argument list, with I as a suffix at the end of the list: reso da foomentum weldum tum cum xrayum tum yellum barmentum tum zipum. It is always permissible to specify the start of a nested argument list with a I, so long as the governing verb is used as a suffix. Ecce Intitulo Secundum Blocks and control structures Natural languages generally use some parenthetical device -- such as parentheses, commas, or (as here) dashes -- to group and separate collections of phrases or statements. Some such mechanism would be an obvious choice for denoting Perligata code blocks, but there is a more aesthetically pleasing solution. Perl's block delimiters (C<{>..C<}>) have two particularly desirable properties: they are individually short, and collectively symmetrical. It was considered important to retain those characteristics in Perligata. In Latin, the word I has a sense that means "as follows". Happily, its heteropalindrome, I, has the meaning (among others) "to here", making these two words perfect heteroantigrams (just like C<{> and C<}>). The allure of this kind of wordplay being impossible to resist, Perligata delimits blocks of statements with these two words. For example: sic # { loco ianitori. # local $/; dato nuntio perlegementum da. # $data = ; cis # } Control structures in Perligata are rendered as conditional clauses, as they are in Latin, English, and Perl. And as in those other languages, they may precede or follow the code blocks they control. Perligata provides the following control structures: Perligata Perl ========= ==== si ... fac if ... nisi ... fac unless ... dum ... fac while ... donec ... fac until ... per (quisque) ... in ... fac for(each) ... posterus next ultimus last reconatus redo confectus continue The trailing I is the imperative form of I ("to do") and is used as a delimiter on the control statement's condition. It is required, regardless of whether the control statement precedes or follows its block. The choice of I and I is completely arbitrary, since Latin does not distinguish "while" and "until" as abstractions in the way English does. I and I each mean both "while" and "until", and Latin relies on context (i.e. semantics) to distinguish them. This is impractical for Perligata, so it always treats I as C and I as C. This choice was made in order to favour the shorter term for the more common type of loop. The choice of I for C seeks to convey the function of the control structure, not the literal meaning of the English word. That is, a C block specifies how to complete (I) an iteration. Perligata only supports the pure iterative form of C, not the C-like three-part syntax. Because: foreach $var (@list) {...} means "for each variable in the list...", the scalar variable must be in the accusative (as it is governed by the preposition "for"), and the list must be in the ablative (denoting inclusion). Fortunately, in the second declension, the inflexion for ablatives is exactly the same as for datives, giving: per quisque varum in listis sic ... cis This means that no extra inflexions have to be learned just to use the I loop. Better still, the list (I) looks like a Perligata array variable in a target role, which it clearly is, since its contents may be modified within the loop. Note that you can also omit the accusative variable completely: per quisque in listis sic ... cis and leave I (C<$_>) implied, as in regular Perl. Ecce Intitulo Secundum Data The C<__END__> and C<__DATA__> markers in Perligata are I ("boundary") and I ("information") respectively. Data specified after either of these markers is available via the input stream I. For example: dum perlege nuntio fac sic # while () { scribe egresso hoc. # print $_; cis # } # finis # __END__ post # post hoc # hoc ergo # ergo propter # propter hoc # hoc Ecce Intitulo Secundum Numbers Numeric literals in Perligata are rendered by Roman numerals -- I, I, I, I...I...I, etc, up to I<(((((((I)))))))((((((((I))))))))((((((I))))))(((((((I)))))))(((((I)))))((((((I))))))((((I))))(((((I)))))(((I)))((((I))))((I))(((I)))M((I))CMXCIX> (that is: 9,999,999,999) The digits are: Roman Arabic ===== ====== I 1 V 5 X 10 L 50 C 100 D 500 M 1,000 I)) 5,000 ((I)) 10,000 I))) 50,000 (((I))) 100,000 I)))) 500,000 ((((I)))) 1,000,000 I))))) 5,000,000 (((((I))))) 10,000,000 I)))))) 500,000,000 ((((((I)))))) 1,000,000,000 I))))))) 5,000,000,000 (((((((I))))))) 10,000,000,000 The value I<((I))> is 10,000 and every additional pair of I (rendered as parentheses in ASCII) multiply that value by 10. Notice that those wacky Romans literally used "half" of each big number (e.g. I, I, etc.) to represent half of each big numbers (i.e. 5000, 50000, etc.) The first 10 numbers may also be referred to by name: I/I, I/I, I, I, I, I, I, I, I, I. Zero, for which there is no Latin numeral, is rendered by I ("no-one"). I ("nothing") might have been a closer rendering, but it is indeclinable and hence indistinguishable in the accusative and genitive. When a numeric literal is used in an indexing operation, it must be an ordinal: "zeroth (element)", "first (element)", "second (element)", etc. The first ten ordinals are named (in the accusative): I/I, I/I, I/I, I/I, I/I, I/I, I/I, I/I, I/I, I/I. Ordinals greater than ten are represented by their corresponding numeral with the suffix I<-imum>: I ("15th"), I ("42nd"), etc. By analogy, ordinal zero is rendered by the invented form I. If the element being indexed is used as an lvalue, then the ordinal must of course be in the dative instead: I, I, I, I, I, I, I, I, I, I, I, I, etc. Note that the feminine dative forms are I available in Perligata, as they are ambiguous with the feminine genitive singular forms. In a multi-level indexing operation, ordinals may need to be specified in the genitive: I/I, I/I, I/I, I/I...I/I, etc. For example: $unimatrix[1][3][9][7]; would be: septimum noni tertii primi unimatrixorum which is literally: seventh of ninth of third of first of unimatrix Note that the order of the genitives is significant here, and is the reverse of that required in Perl. As mentioned in L<"Variables">, Perligata currently only supports homogeneous multi-level indexing. If the final genitive indicates an array (e.g. I in the previous example), then the preceding index is assumed to be an array index. If the final genitive indicates a hash, every preceding genitive, and the original ordinal are presumed to be keys. For example: septimum noni tertii primi unimatrixorum # $unimatrix[1][3][9][7]; septimum noni tertii primi unimatrixuum # $unimatrix{1}{3}{9}{7}; Floating point numbers are expressed in Perligata as Latin fractions: unum quartum # 0.25 MMMCXLI Mimos # 3.141 Note that the numerator is always a cardinal and the denominator a (singular or plural) ordinal ("one fourth", "3141 1000ths"). The plural of a Latin accusative ordinal is formed by replacing the I<-um> suffix by I<-os>. This nicety can be ignored, as Perligata will accept fractions in the form I ("3141 1000th") Technically, both numerator and denominator should also be in the feminine gender -- I, I. This Latin rule is not enforced in Perligata (to help minimize the number of suffixes that must be remembered), but Perligata I accept the feminine forms. Perligata outputs numbers in Arabic, but the verb I ("beautify") may be used to convert numbers to proper Roman numerals: per quisque in I tum C conscribementum sic hoc tum duos multiplicamentum comementum egresso scribe. cis Ecce Intitulo Secundum Strings Classical Latin does not use punctuation to denote direct quotation. Instead the verb I ("said") is used to report a direct utterance. Hence in Perligata, a literal character string is constructed, not with quotation marks, but by invoking the verbal noun I ("the result of saying"), with a data list of literals to be interpolated. For example: print STDOUT 'Enter next word:'; becomes: Enter tum next tum word inquementum tum biguttam egresso scribe. Note that the arguments to I are special, in that they are treated as literals. Punctuation strings have special names, such as I ("a hole") for space, I ("a stride") for tabspace, I ("new verse") for newline, I ("comma") for comma, I ("a spot") for period, or I ("two spots") for colon. It is also possible to directly quote a series of characters (as if they were inside a C. The Perligata equivalent is a I: sic Enter next word : cis dictum egresso scribe. or: dictum sic Enter next word : cis egresso scribe. C is, of course, a contraction of C ("the result of saying"), and Perligata allows this older form as well. Perligata does not provide an interpolated quotation mechanism. Instead, variables must be concatenated into a string. So: print STDERR "You entered $word\n"; $mesg = "You entered $word"; becomes: You tum entered inquementum tum wordum tum novumversum oraculo scribe. mesgo da You tum entered inquementum tum wordum serementum. ECCE PROSUM RELIQUO Regular expressions ECCE INCIPIO SOMNIUM B> In Perligata, patterns will be specified in a constructive syntax (as opposed to Perl's declarative approach). Literals will be regular strings and other components of a pattern will be adjectives, verbs, nouns, or a connective: Perl Perligata Meaning ==== ========= ======= ...+? multum "many" ...+ plurissimum "most" ...?? potis "possible" ...? potissimum "most possible" (...) captivum "captured" (?=...) excuba "keep watch" [...] opta "choose between" . quidlibet "anything" \d digitum "a finger" \s lacunam albam "a white space" \w litteram "a character" | an interrogative "or" The final pattern will be produced using the supine I. For example: pato da desideratum # $pat = qr/(?x) C tum plurissimum A tum O opta tum T # C[AO]+T an DOG tum potissimum GY. # |DOG(?:GY)?/; Actual matching against a pattern will be done via the I ("match") and I ("substitute") verbs: si stringum patum comparamentum fac sic # if ($string =~ /$pat/) { scribe egresso par inquementum # print "match" cis # huic substitue patum tum valum # s/$pat/$val/ per quisque in listis. # foreach @list; Note that the string being modified by I will have to be dative. ECCE FINIO SOMNIUM Ecce Intitulo Secundum References To create a reference to a variable, the variable is written in the ablative (which looks exactly like the dative in Perligata's restricted Latin syntax) and prefaced with the preposition I ("to"). To create a reference to a subroutine, the associated verb is inflected with the accusative suffix I<-torem> ("one who...") to produce the corresponding noun-of-agency. For example: val inquemento hashuum ad dato da. # $hash{'val'} = \$dat; arg inquemento hashuum ad argis da. # $hash{'arg'} = \@arg; act inquemento hashuum functorem da. # $hash{'act'} = \&func; ad val inquemento hashuum dato da. # $dat = \$hash{'val'}; ad inquemento arg hashuum argis da. # @arg = \$hash{'arg'}; funcemento da ad inquemento act hashuum. # func() = \$hash{'act'}; A special case of this construction is the anonymous subroutine constructor I ("one who does..."), which is the equivalent of C in Perl: anonymo da factorem sic haec mori cis. # $anon = sub { die @_ }; As in Perl, such subroutines may be invoked by concatenating a call specifier to the name of the variable holding the reference: anonymume nos tum morituri inquementum. # &$anon('Nos morituri'); Note that the variable holding the reference (I) is being used as data, so it is named in the accusative. In the few cases where a subroutine reference can be the target of an action, the dative suffix (I<-tori>) is used instead: benedictum functori classum. # bless \&func, $class; benedictum factori sic mori cis classum. # bless sub{die}, $class; To dereference other types of references, a resultative of the verb I ("fetch") is used: Ref type Perligata Perl Context ======== ========= ==== ======= scalar arcessementum varum $$var rvalue scalar arcessemento varum $$var lvalue array arcessementi varum ...[$$var] rvalue array arcessementa varum @$var rvalue array arcessementis varum @$var lvalue array arcessementorum varum $var->[...] either hash arcessementus varum %$var rvalue hash arcessementibus varum %$var lvalue array arcessementuum varum $var->{...} either Note that the first six forms are just the standard resultatives (in accusative, dative, and genitive) for the regular Perligata verb I. The last three forms are ungrammatical inflections (I<-mentum> is 2nd declension, not 4th), but are plausible extensions of the resultative to denote a hash return value. Multiple levels of dereferencing are also possible: valo da arcessementa arcessementum varum # $val = @$$var; as is appropriate indexing (using the genitive forms): valo da primum varum arcessementorum # $val = $var->[1]; valo da primum varum arcessementuum # $val = $var->{1}; valo da primum varum arcessementi arrorum # $val = $arr[$$var][1]; Ecce Intitulo Secundum Boolean logic Perl's logical conjunctive and disjunctive operators come in two precedences, and curiously, so do those of Latin. The higher precedence Perl operators -- C<&&> and C<||> -- are represented in Perligata by the emphatic Latin conjunctions I and I respectively. The lower precedence operators -- C and C -- are represented by the unemphatic conjunctive suffixes I<-que> and I<-ve>. Hence: reso damentum foundum atque runementum. # $res = $found && run(); reso damentum foundum runementumque. # $res = $found and run(); reso damentum foundum vel runementum. # $res = $found || run(); reso damentum foundum runementumve. # $res = $found or run(); Note that, as in Latin, the suffix of the unemphatic conjunction is always appended to the first word after the point at which the conjunction would appear in English. Thus: $result = $val or max($1,$2); is rendered as: resulto damentum valum parprimumve tum parsecundum maxementum. or: resulto damentum valum maxementumve parprimum tum parsecundum. Proper Latinate comparisons would be odious in Perligata, because they require their first argument to be expressed in the nominative and would themselves have to be indicative. This would, of course, improve the positional independence of the language even further, allowing: si valus praecedit datum... # if $val < $dat... si praecedit datum valus... # if $val < $dat... si datum valus praecedit... # if $val < $dat... Unfortunately, it also introduces another set of case inflexions and another verbal suffix. Worse, it would mean that noun suffixes are no longer unambiguous. In the 2nd declension, the nominative plural ends in the same I<-i> as the genitive singular, and the nominative singular ending (I<-us>) is the same as the accusative plural suffix for the fourth declension. So if nominatives were used, scalars could no longer always be distinguished from arrays or from hashes, except by context. To avoid these problems, Perligata represents the equality and simple inequality operators by three pairs of verbal nouns: Perligata Meaning Perl ========= ======= ==== aequalitam "equality (of...)" == aequalitas "equalities (of...)" eq praestantiam "precedence (of...)" < praestantias "precedences (of...)" lt comparitiam "comparison (of...)" <=> comparitias "comparisons (of...)" cmp Each operator takes two data arguments, which it compares: si valum tum datum aequalitam # si $val == $dat si valum tum datum praestantias # si $val lt $dat si aum tum bum comparitiam # si $a <=> $b The effects of the other comparison operators -- C>, C=>, C, C, C, etc. -- are all achieved by appropriate ordering of the two arguments and combination with the the logical negation operator I: si valum tum datum non aequalitam # if $val != $dat si datum tum valum praestantiam # if $val > $dat si valum non praestantias datum # if $val ge $dat Ecce Intitulo Secundum Packages, classes, and modules The Perligata keyword to declare a package is I, literally "the house of". In this context, the name of the class follows the keyword and is treated as a literal; as if it were the data argument of an I. To explicitly specify a variable or subroutine as belonging to a package, the preposition I ("within") is used. To call a subroutine as a method of a particular package (or of an object), the preposition I ("of the house of") is used. Thus I is Perligata's C<::> and I is its C<-E>. Inheritance is specified by the I statement, within a C. The name of the base class follows the keyword and is treated as a literal. This is equivalent to Perl's C pragma. The Perl C function is I in Perligata, but almost invariably used in the scalar accusative form I. Perligata also understands the correct (contracted) Latin form of this verb: I. Thus: domus Exemplar intra Simplicio. # package Simplicio::Exemplar; printere # sub print sic # { modus tum indefinitus inquementum mori. # die 'method undefined'; cis # } domus Specimen. # package Specimen; legatarius Exemplar intra Simplicio. # use base 'Simplicio::Exemplar'; newere # sub new sic # { meis datibus. # my %data; counto intra Specimen postincresce. # $Specimen::count++; datibus primum horum benedictum. # bless \%data, $_[0]; cis # } printere # sub print sic # { meo selfo his decapitamentum da. # my $self = shift @_; haec inquementum carpe. # carp "@_"; cis # } domus princeps. # package main; meo objecto da # my $object = newementum apud Specimen. # Specimen->new; printe apud objectum; # $object->print; To import semantics from external modules, the Perl C function is I ("use") in Perligata. Note that many module name components end in character patterns that match Perligata syntactic suffixes; e.g. the "Type" in "File::Type" ends with an "e", and "e" is used as a suffix to represent a subroutine call in void context. To prevent Perligata from misinterpreting such name components, the keyword I ("as it certainly is") is used to tell Perligata to not interpret the suffix as being syntactically significant. For example: strict ute. # use strict; warnings ute. # use warnings; Type sicut intra File ute. # use File::Type; meo specio da # my $type = newementum apud Type intra File. # File::Type->new(); Without the I keyword in the I line, the "e" in "Type" would be interpreted as being syntactically significant, and an error would be reported on that line. (Note that the "e" in "File" on the I line and those in "Type" and "File" on the I line do not require their own I keywords, since there is no ambiguity as to whether they might represent subroutine calls in void context.) Ecce Intitulo Secundum ERA (I) Perligata supports almost the same set of documentation blocks as Perl. (See L for details). However, whereas POD blocks are introduced by an C<=> sign, ERA blocks are prefixed with the interjection: "Ecce" I<("Behold!")> Just as with POD, each ERA documentation block must be the first thing on a line, and opens a documentation section that continues until the next C I<("Behold! I cut")> command. ERA also recognizes two unheralded block types: I, which are lines of text starting on the left margin; and I, which are lines of text that are indented. All the standard Perl formatting codes E C<< BZ<><> >>, C<< IZ<><> >>, C<< CZ<><> >>, C<< EZ<><> >>, I E are also supported. The following table lists the available ERA documentation blocks: Perl POD Perligata ERA =pod ecce explico =for ecce prosum =begin ecce incipio =end ecce finio =head1 ecce intitulo primum =head2 ecce intitulo secundum =head3 ecce intitulo tertium =head4 ecce intitulo quartum =head5 ecce intitulo quintum =head6 ecce intitulo sextum =over ecce ad dextram =back ecce ad sinistram =item * ecce facio punctum =item 1. ecce numero punctum =item ecce definio =cut ecce seco The module also ships with a script (F) which can convert ERA to POD and pass it to C for display. ECCE INTITULO PRIMUM THESAURUS PERLIGATUS This section lists the complete Perligata vocabulary, except for Roman numerals (I, I, I, etc.) In each of the following tables, the three columns are always the same: "Perl construct", "Perligata equivalent", "Literal meaning of Perligata equivalent". Generally, only the accusative form is shown for nouns and adjectives, and only the imperative for verbs. Ecce Intitulo Secundum Values and variables 0 nullum "no-one" 1 unum "one" 2 duo "two" 3 tres "three" 4 quattuor "four" 5 quinque "five" 6 sex "six" 7 septem "seven" 8 octo "eight" 9 novem "nine" 10 decem "ten" [0] nullimum "zeroth" [1] primum "first" [2] secundum "second" [3] tertium "third" [4] quartum "fourth" [5] quintum "fifth" [6] sextum "sixth" [7] septimum "seventh" [8] octavum "eighth" [9] nonum "ninth" [10] decimum "tenth" $0 programma "the program" $1 parprimum "equal of the first" $2 parsecundum "equal of the first" $3 partertium "equal of the third" $4 parquartum "equal of the fourth" $5 parquintum "equal of the fifth" $6 parsextum "equal of the sixth" $7 parseptimum "equal of the seventh" $8 paroctavum "equal of the eighth" $9 parnonum "equal of the ninth" $10 pardecimum "equal of the tenth" $/ ianitorem "gatekeeper" $#var admeta varum "measure out" $_ hoc/huic "this thing" @_ his/horum "these things" $< nomen "a name" @ARGV parametra "parameters" "," comma "a comma" "." guttam "a spot" ":" biguttam "two spots" ";" semicolon "semicolon" " " lacunam "a gap" "\t" stadium "a stride" "\n" novumversum "new line" local loco "in place of" my meo "my" our nostro "our" main princeps "principal" Ecce Intitulo Secundum Quotelike operators '...' inque "say" q// inque "say" m// compara "match" s/// substitue "substitute" tr/// converte "translate" Ecce Intitulo Secundum Mathematical operators and functions + adde "add" - deme "subtract" - nega "negate" * multiplica "multiply" / divide "divide" % recide "lop off" ** eleva "raise" & consocia "unite" | interseca "intersect" ^ discerne "differentiate (between)" ++ preincresce "increase beforehand" ++ postincresce "increase afterwards" -- predecresce "decrease beforehand" -- postdecresce "decrease afterwards" abs priva "strip from" atan2 angula "create an angle" sin oppone "oppose" cos accuba "lie beside" int decolla "behead" log succide "log a tree" sqrt fode "root into" rand conice "guess, cast lots" srand prosemina "to scatter seed" Ecce Intitulo Secundum Logical and comparison operators ! non "general negation" && atque "empathic and" || vel "emphatic or" and -que "and" or -ve "or" < praestantiam "precedence of" lt praestantias "precedences of" <=> comparitiam "comparison of" cmp comparitias "comparisons of" == aequalitam "equality of" eq aequalitas "equalities of" Ecce Intitulo Secundum Strings chomp morde "bite" chop praecide "cut short" chr inde "give a name to" hex senidemi "sixteen at a time" oct octoni "eight at a time" ord numera "number" lc deminue "diminish" lcfirst minue "diminish" uc amplifica "increase" ucfirst amplia "increase" quotemeta excipe "make an exception" crypt huma "inter" length meta "measure" pos reperi "locate" pack convasa "pack baggage" unpack deconvasa "unpack" split scinde "split" study stude "study" index scruta "search" join coniunge "join" substr excerpe "extract" Ecce Intitulo Secundum Scalars, arrays, and hashes defined confirma "verify" undef iani "empty, make void" scalar secerna "to distinguish, isolate" reset lusta "cleanse" pop decumula "unstack" push cumula "stack" shift decapita "behead" unshift capita "crown" splice iunge "splice" grep vanne "winnow" map applica "apply to" sort digere "sort" reverse retexe "reverse" delete dele "delete" each quisque "each" exists adfirma "confirm" keys nomina "name" values argue "to disclose the contents" Ecce Intitulo Secundum I/O open evolute "open a book" close claude "close a book" eof extremus "end of" read lege "read" getc sublege "pick up something" readline perlege "read through" print scribe "write" printf describe "describe" sprintf rescribe "rewrite" write subscribe "write under" pipe inriga "irrigate" tell enunta "tell" seek conquire "to seek out" ARGV parametro "(from) a parameter" DATA nuntio "(from) the information" STDIN vestibulo "(from) the entrance" STDOUT egresso "(to) the exit" STDERR oraculo "(to) the place where doom is pronounced" Ecce Intitulo Secundum Control structures {...} sic...cis "as follows...to here" do fac "do" sub {...} factorem sic...cis "one who does ... eval aestima "evaluate" exit exi "exit" for per...in...fac "for...in...do" foreach per quisque...in...fac "for each...in...do" goto adi "go to"