• Contact Us
  • Advertise
  • Submit PR
Thursday, January 22, 2026
  • Login
  • Register
YNOT
  • Home
  • Industry News
    • Adult Business News
    • Adult Novelty News
    • Web & Tech News
    • Video Game News
    • EU News
  • PR Wire
  • Podcasts
  • Industry Guides
  • Newsletters
No Result
View All Result
  • Home
  • Industry News
    • Adult Business News
    • Adult Novelty News
    • Web & Tech News
    • Video Game News
    • EU News
  • PR Wire
  • Podcasts
  • Industry Guides
  • Newsletters
No Result
View All Result
YNOT
No Result
View All Result
Home YNOT Features YNOT University

Perl and Object Oriented Programming

admin by admin
July 28, 2000
in YNOT University
News Flash to White House: 95-Percent of Americans Didn’t Wait for Marriage
491
SHARES
Share on FacebookShare on Twitter

“Hereby you reduce the time it takes to code, hence, making you more productive!”In a previous article I mentioned perl modules, and how modularising your code can be a good thing. We’re going to take it a step further this time and discuss Perl Objects. Perl’s definition of an object is very simple: “An Object is a reference to a thingie that belongs to another thingie”.

Says much doesn’t it? What it comes down to – an object is a variable that belongs to a specific class. An example:


package MyThingie;

sub new {
my $that=shift;
my $this=ref($that) || $that;
my $self={};
bless($self, $this);
return $self;
}

Basically, what that did is create an object. You use that one as follows:


use MyThingie;
$thing=new MyThingie;

There you go. You blessed ‘thing’ into the ‘MyThingie’ class. Now, the fun part about objects is that you can move them around at will. If I wanted 10 MyThingie objects, I could create 10 and push them into an array. You can also store variables and methods inside an object, like this:


package MyThingie;

sub new {
my $that=shift;
my $this=ref($that) || $that;
my $self={“thingie” => “something”};

bless($self, $this);
return $self;
}

sub what {
my $self=shift;
my $what=shift;

return $self->{what};
}

Using the above usage example, you would be able to do this:


$something=$thingie->what();

$something would now contain ‘something’. Objects are especially useful for writing skeleton applications, that is, provide all the functions necessary for an application to work. Since you can now easily create multiple frontends for applications using the same object.

“Hereby you reduce the time it takes to code, hence, making you more productive!”

Another fun trait about objects is that they can ‘inherit’ from other objects. Taking the above MyThingie object, we can make another object that inherits from that class by simply using this:


package AnotherThingie;
use MyThingie;

@ISA=qw(MyThingie);
sub that {
my $self=shift;

print(“That’s nice\n”);
}

This AnotherThingie class will inherit all methods from the MyThingie class (including it’s constructor ‘new’ and the ‘what’ function) and adds a new ‘that’ function:


use AnotherThingie;

$anotherthingie=new AnotherThingie;
print($anotherthingie->what);
$anotherthingie->that;

See how easy that was? This is the key to objects. You can now write very complicated applications in a short matter of time!

You can have a base class to access a database for you and give it enough functions to be able to connect, store, and retrieve data. On top of that class, you can build a new class that will do exactly what you want it to do for any given application. Hereby you reduce the time it takes to code, hence, making you more productive!

Reader Comments on this Article:

Comment by:Summary:
StephenI *Still* Don’t Get It! ™

Share196Tweet123
admin

admin

YNOT Admin wields his absolute power without mercy. When he's not busy banning spam comments to hell he enjoys petting bunnies and eating peanut butter. He recommends everyone try the YNOT Mail (ynotmail.com) email marketing platform and avoid giving their money to mainstream services that hate adult companies.

Related Posts

Adult Business News

UK Online Safety Act Cuts Pornhub Traffic 36% as Age Verification Takes Effect

December 13, 2025
The Cambassador: Lindsey Banks, Flirt4Free and Brand Representation
Adult Business News

The Cambassador: Lindsey Banks, Flirt4Free and Brand Representation

September 5, 2018
ImLive’s Mere Menezes Siqueira Manages Models, Makes the Machine Work
Adult Business News

ImLive’s Mere Menezes Siqueira Manages Models, Makes the Machine Work

August 23, 2018
Corey Silverstein of Adult.law
Adult Business News

Silverstein Says: 3 Legal Issues Cam Companies, Models Must Pay Attention To

August 22, 2018
Load More

SPONSOR

INDUSTRY EVENTS

Currently Playing

YNOT Summit Model Track: Nerds Dig Sexy Gamers

YNOT Summit Model Track: Nerds Dig Sexy Gamers

01:05:46

YNOT Summit Webmaster Track: Understanding Webcam Business Models

00:51:11

YNOT Summit Model Track: Cam Law 101

01:26:24

POPULAR NEWS

Lucky Luck of Lucky Luck Productions Featured on Fucking Around with Porn Stars on Skyhawk After Dark Radio

January 21, 2026

Shay Fox Makes Her Evolved Fights Debut

January 21, 2026

Melody Marks Stars in “Strong Hands, Sweet Butt” for Oops Family

January 21, 2026

SPONSOR

YNOT YNOT

QUICK LINKS:

  • About YNOT
  • Terms of Use
  • Privacy Policy
  • Editorial Team
  • Advertise on YNOT
  • Support
  • Contact Us

FRIENDS OF YNOT:

  • Best Adult Cams
  • Live Porn
  • Adult Reviews
  • Adult Email Marketing
  • Discounted Porn
  • vr porn sites
  • European Adult Biz Magazine

FRIENDS OF YNOT:

  • Rabbits Reviews
  • XXX Job Interviews
  • Adult Site Broker
  • Femdom
  • Paid Porn Sites
  • Live Sex
  • Cam girl sites
  • 2018 YNOT Cam Awards Official Nominees
  • About YNOT
  • Adult Company Directory – Coming Soon
  • Adult Industry News | Adult Entertainment Business Tools
  • Adult Industry News | Webcams, Affiliates, Web Developers
  • Advertise on YNOT
  • Attending the 2018 YNOT Cam Awards in Hollywood
  • Business Directory
  • Cart
  • Checkout
  • Claim Listing
  • Complaint Policy
  • Contact Editorial Team
  • DMCA Policy
  • Home
  • Home 2
  • Home 3
  • Home 4
  • Home 5
  • My account
  • Newsletters
  • Porn News & XXX Industry News
  • Privacy Policy for California Residents
  • Shop
  • Sitemap
  • Sitemap Categories
  • Support
  • Test Page
  • Test Page
  • YNOT Adult Affiliate Marketing Guide
  • YNOT Cam Awards Nominee Information Page
  • YNOT Magazine: Issue 1, 2018
  • YNOT Party 2016 Austin – Event Page
  • YNOT Policy Regarding Social Media or Private Disputes
  • YNOT Privacy Policy
  • YNOT Terms and Conditions

Copyright © 2026 YNOT Group LLC.

Welcome Back!

Login to your account below

Forgotten Password? Sign Up

Create New Account!

Fill the forms below to register

All fields are required. Log In

Retrieve your password

Please enter your username or email address to reset your password.

Log In
No Result
View All Result
  • 2018 YNOT Cam Awards Official Nominees
  • About YNOT
  • Adult Company Directory – Coming Soon
  • Adult Industry News | Adult Entertainment Business Tools
  • Adult Industry News | Webcams, Affiliates, Web Developers
  • Advertise on YNOT
  • Attending the 2018 YNOT Cam Awards in Hollywood
  • Business Directory
    • Search
    • Submit Listing
    • Submit Listing
    • Submit Listing
    • YNOT Business Directory Submission
  • Cart
  • Checkout
  • Claim Listing
  • Complaint Policy
  • Contact Editorial Team
  • DMCA Policy
  • Home
  • Home 2
  • Home 3
  • Home 4
  • Home 5
  • My account
  • Newsletters
  • Porn News & XXX Industry News
  • Privacy Policy for California Residents
  • Shop
  • Sitemap
  • Sitemap Categories
  • Support
  • Test Page
  • Test Page
  • YNOT Adult Affiliate Marketing Guide
    • Adult Affiliate Marketing for Beginners: A Basic Guide for Getting Started in 2023
    • Adult Affiliate Marketing Verticals Guide
    • Adult Email Marketing Best Practices
    • Buying Adult Email Lists: Why This is Always a Bad Idea
    • Key Concepts: Adult Affiliate Programs
    • Key Concepts: Adult Email Lists
    • Key Concepts: Landing Pages
    • Key Concepts: Sender Reputation
  • YNOT Cam Awards Nominee Information Page
  • YNOT Magazine: Issue 1, 2018
  • YNOT Party 2016 Austin – Event Page
  • YNOT Policy Regarding Social Media or Private Disputes
  • YNOT Privacy Policy
  • YNOT Terms and Conditions

Copyright © 2026 YNOT Group LLC.

We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.