Perl Wiki
Advertisement

An object is generally a packet of information that can traverse domains and contexts without losing its properties and attributes.

Properties are things that an object has:

  1. Creation time: 08:01, 24 September 2006 (UTC)
  2. Author: CQ
  3. KEY:Name

Attributes are things that other objects can use to access or find within its wrapper:

  1. domain (context)
  2. range (allowable contexts)
  3. means (method)
  4. extremes (constraints)

Example[]

Key Object: Genesis

keyword file: Keywords: subject: chronology | genesis, generate, general, connotation, complexity | term awe


Wiktionary terms:

  1. Wiktionary:chronology
  2. Wiktionary:genesis
  3. Wiktionary:generate
  4. Wiktionary:general
  5. Wiktionary:connotation
  6. Wiktionary:complexity
  7. Wiktionary:awe

Perl's task[]

The very article you are reading has a hidden keyword file embedded in its code. Its domain is perl.wikia.com. Its context is that of an article in the main namespace here. What we want to do in-house is build a tool called a parser that seeks out key words and forms them into a prototypical object that can be easily:

  1. unpackaged
  2. processed:
    1. examined
    2. parsed
    3. evaluated
    4. categorized
    5. stablized
    6. vulcanized
    7. configured
    8. cataloged
    9. inventoried
    10. repackaged
  3. distributed

Perl's task is to use regular expressions to break the keywords out and then determine if the are red or blue links. See wikilink

Applied computer science[]

We are in the business of learning, teaching and applying what we learn to real-world situations. See situated learning

User:Beland can tell you that the use of perl in parsing Wikipedia content can make life a lot easier to maintainers of a relational database. Perl is adaptive enough to overcome limitations (constraints) imposed by policy enforced at say, Wikipedia.

Article and Talk contexts[]

Here within the perl.wiki.com context, we can generate red links all day long without getting YELLED AT. Not so at Wikipedia.

Wiktionary, on the other hand is another critter altogether.

In-house lexicon[]

Our in-house lexicon is essentially a tool for extracting wikilinks, both red and blue from texts, no matter where they came from, as long as they are situated between the opening paragraph and the first section header of a document.

Perl Wiki:Library is what we call our HOUSE. A house can only be a home if there is fuel for the fire, food in the pantry, and boots by the door. Our continuing quest is to make sure that we add value to our content and that job starts at home on our Perl Wiki: project space. See m:namespace

Prototypes and protocols[]

We must first form our object:

We begin with a wrapper having this format:

<!-- keyword file -->

For our lexicon, we want some uniform handlers for our object. Perl wants to see a couple of filehandles on this puppy:

<SUBJECT>
<OBJECT> 

That's called a prototype for an almost standardized wrapper for a keyword file. I made this one manually in the text of the genesis article:

<!-- keyword file:
'''[[Keyword]]s:''' 
''[[subject:]] '''[[chronology]]''''' | 
[[genesis]], 
[[generate]], 
[[general]], 
[[connotation]],
[[complexity]] | 
'''[[term]]'''
''[[awe]]''
/-->

From that we can see that the <OBJECT> is a keyword file and the <SUBJECT> is Chronology. This packet is now a fully-qualified Lexicon Object that can safely be transported to another context. see MUTEX

Context switch[]

Advertisement