c class
Sponsored Links
Sponsored Links
Secleted [ 0 ] software to compare
Results 1 - 15 of about 2685
DB_cart Class 1.13
DB_cart Class is a MySQL shopping cart script that can be used with third party product catalogues and membership systems. more>>
DB_cart Class is a MySQL shopping cart script that can be used with third party product catalogues and membership systems. The MySQL database structure is neutral to existing systems.
DB_cart Class can handle the shopping cart (add, update, and empty) and checkout process (set the shipment address and email the order).
For existing cart users, the shopping cart is still available upon the users next visit and is visible by checkout. The last option is configurable togther with a time period.
Enhancements:
- There are modifications and improvements inside the main class file, several examples, and the table structure has been extended.
- There two additional fields for the shipment values (name2 and address2).
- All messages are available in German, English, and Dutch.
- The standard text inside the email messages is in external files now; this content is parsed inside the improved email method.
<<lessDB_cart Class can handle the shopping cart (add, update, and empty) and checkout process (set the shipment address and email the order).
For existing cart users, the shopping cart is still available upon the users next visit and is visible by checkout. The last option is configurable togther with a time period.
Enhancements:
- There are modifications and improvements inside the main class file, several examples, and the table structure has been extended.
- There two additional fields for the shipment values (name2 and address2).
- All messages are available in German, English, and Dutch.
- The standard text inside the email messages is in external files now; this content is parsed inside the improved email method.
Download (0.035MB)
Added: 2006-06-16 License: BSD License Price:
1227 downloads
Calendario Class 1.0
Calendario Class provides a PHP class that is useful for creating calendars and organizers. more>>
Calendario Class provides a PHP class that is useful for creating calendars and organizers.
Calendario Class is a PHP class that helps you to create calendar and organizers.
Its highly configurable, letting you choose how many days are in a week, when a week starts, the details of the HTML output, and so on.
It also knows about holidays.
Enhancements:
- Added holidays functionality
<<lessCalendario Class is a PHP class that helps you to create calendar and organizers.
Its highly configurable, letting you choose how many days are in a week, when a week starts, the details of the HTML output, and so on.
It also knows about holidays.
Enhancements:
- Added holidays functionality
Download (0.096MB)
Added: 2007-03-16 License: LGPL (GNU Lesser General Public License) Price:
956 downloads
Access_user Class 1.92
Access_user Class is an easy to use system for protecting pages and registering users. more>>
Access_user Class is an easy to use system for protecting pages and registering users. The main features are user login, user registration, page protection, forgotten password recovery, and email-based account activation.
The class is powered by MySQL and PHP sessions. Inside the package are examples for all primary methods.
Enhancements:
- Its now possible to store the session data in your database.
- This is much safer if you use sessions on a shared hosting server.
- The password is always encoded with MD5 now.
- session_destroy() was added to the logout method.
- The links used in the email messages are now double MD5-encoded.
<<lessThe class is powered by MySQL and PHP sessions. Inside the package are examples for all primary methods.
Enhancements:
- Its now possible to store the session data in your database.
- This is much safer if you use sessions on a shared hosting server.
- The password is always encoded with MD5 now.
- session_destroy() was added to the logout method.
- The links used in the email messages are now double MD5-encoded.
Download (0.036MB)
Added: 2006-10-20 License: GPL (GNU General Public License) Price:
1100 downloads
Class::CGI 0.20
Class::CGI is a Perl module to fetch objects from your CGI object. more>>
Class::CGI is a Perl module to fetch objects from your CGI object.
SYNOPSIS
use Class::CGI
handlers => {
customer_id => My::Customer::Handler
};
my $cgi = Class::CGI->new;
my $customer = $cgi->param(customer_id);
my $name = $customer->name;
my $email = $cgi->param(email); # behaves like normal
if ( my %errors = $cgi->errors ) {
# do error handling
}
For small CGI scripts, its common to get a parameter, untaint it, pass it to an object constructor and get the object back. This module would allow one to to build Class::CGI handler classes which take the parameter value, automatically perform those steps and just return the object. Much grunt work goes away and you can get back to merely pretending to work.
<<lessSYNOPSIS
use Class::CGI
handlers => {
customer_id => My::Customer::Handler
};
my $cgi = Class::CGI->new;
my $customer = $cgi->param(customer_id);
my $name = $customer->name;
my $email = $cgi->param(email); # behaves like normal
if ( my %errors = $cgi->errors ) {
# do error handling
}
For small CGI scripts, its common to get a parameter, untaint it, pass it to an object constructor and get the object back. This module would allow one to to build Class::CGI handler classes which take the parameter value, automatically perform those steps and just return the object. Much grunt work goes away and you can get back to merely pretending to work.
Download (0.017MB)
Added: 2006-10-20 License: Perl Artistic License Price:
1099 downloads
PHP ImageMagick Class 1.0
PHP ImageMagick Class is a class for processing images with ImageMagick. more>>
PHP ImageMagick Class is a class for processing images with ImageMagick. This PHP Class makes it possible to process images in a very easy way.
To scale an image to 640x480 when its bigger youy can do this:
include(imagemagick.class.php);
$im = new Imagemagick($targetdir);
$im->Resize(640, 480, keep_aspect);
$im->Save();
$im->CleanUp();
?>
Enhancements:
- retrieve image data
- flip
- dither
- monochrome
- negate
- rotate
- blur
- draw frame
- resize
- square
- crop
- convert
- save
<<lessTo scale an image to 640x480 when its bigger youy can do this:
include(imagemagick.class.php);
$im = new Imagemagick($targetdir);
$im->Resize(640, 480, keep_aspect);
$im->Save();
$im->CleanUp();
?>
Enhancements:
- retrieve image data
- flip
- dither
- monochrome
- negate
- rotate
- blur
- draw frame
- resize
- square
- crop
- convert
- save
Download (0.005MB)
Added: 2006-07-14 License: GPL (GNU General Public License) Price:
712 downloads
Class::Meta 0.53
Class::Meta is a Perl class automation, introspection, and data validation. more>>
Class::Meta is a Perl class automation, introspection, and data validation.
SYNOPSIS
Generate a class:
package MyApp::Thingy;
use strict;
use Class::Meta;
use Class::Meta::Types::String;
use Class::Meta::Types::Numeric;
BEGIN {
# Create a Class::Meta object for this class.
my $cm = Class::Meta->new( key => thingy );
# Add a constructor.
$cm->add_constructor(
name => new,
create => 1,
);
# Add a couple of attributes with generated methods.
$cm->add_attribute(
name => uuid,
authz => Class::Meta::READ,
type => string,
required => 1,
default => sub { Data::UUID->new->create_str },
);
$cm->add_attribute(
name => name,
is => string,
required => 1,
default => undef,
);
$cm->add_attribute(
name => age,
is => integer,
default => undef,
);
# Add a custom method.
$cm->add_method(
name => chk_pass,
view => Class::Meta::PUBLIC,
);
$cm->build;
}
Then use the class:
use MyApp::Thingy;
my $thingy = MyApp::Thingy->new;
print "ID: ", $thingy->id, $/;
$thingy->name(Larry);
print "Name: ", $thingy->name, $/;
$thingy->age(42);
print "Age: ", $thingy->age, $/;
Or make use of the introspection API:
use MyApp::Thingy;
my $class = MyApp::Thingy->my_class;
my $thingy;
print "Examining object of class ", $class->package, $/;
print "nConstructors:n";
for my $ctor ($class->constructors) {
print " o ", $ctor->name, $/;
$thingy = $ctor->call($class->package);
}
print "nAttributes:n";
for my $attr ($class->attributes) {
print " o ", $attr->name, " => ", $attr->get($thingy), $/;
if ($attr->authz >= Class::Meta::SET && $attr->type eq string) {
$attr->get($thingy, hey there!);
print " Changed to: ", $attr->get($thingy), $/;
}
}
print "nMethods:n";
for my $meth ($class->methods) {
print " o ", $meth->name, $/;
$meth->call($thingy);
}
Class::Meta provides an interface for automating the creation of Perl classes with attribute data type validation. It differs from other such modules in that it includes an introspection API that can be used as a unified interface for all Class::Meta-generated classes. In this sense, it is an implementation of the "Facade" design pattern.
<<lessSYNOPSIS
Generate a class:
package MyApp::Thingy;
use strict;
use Class::Meta;
use Class::Meta::Types::String;
use Class::Meta::Types::Numeric;
BEGIN {
# Create a Class::Meta object for this class.
my $cm = Class::Meta->new( key => thingy );
# Add a constructor.
$cm->add_constructor(
name => new,
create => 1,
);
# Add a couple of attributes with generated methods.
$cm->add_attribute(
name => uuid,
authz => Class::Meta::READ,
type => string,
required => 1,
default => sub { Data::UUID->new->create_str },
);
$cm->add_attribute(
name => name,
is => string,
required => 1,
default => undef,
);
$cm->add_attribute(
name => age,
is => integer,
default => undef,
);
# Add a custom method.
$cm->add_method(
name => chk_pass,
view => Class::Meta::PUBLIC,
);
$cm->build;
}
Then use the class:
use MyApp::Thingy;
my $thingy = MyApp::Thingy->new;
print "ID: ", $thingy->id, $/;
$thingy->name(Larry);
print "Name: ", $thingy->name, $/;
$thingy->age(42);
print "Age: ", $thingy->age, $/;
Or make use of the introspection API:
use MyApp::Thingy;
my $class = MyApp::Thingy->my_class;
my $thingy;
print "Examining object of class ", $class->package, $/;
print "nConstructors:n";
for my $ctor ($class->constructors) {
print " o ", $ctor->name, $/;
$thingy = $ctor->call($class->package);
}
print "nAttributes:n";
for my $attr ($class->attributes) {
print " o ", $attr->name, " => ", $attr->get($thingy), $/;
if ($attr->authz >= Class::Meta::SET && $attr->type eq string) {
$attr->get($thingy, hey there!);
print " Changed to: ", $attr->get($thingy), $/;
}
}
print "nMethods:n";
for my $meth ($class->methods) {
print " o ", $meth->name, $/;
$meth->call($thingy);
}
Class::Meta provides an interface for automating the creation of Perl classes with attribute data type validation. It differs from other such modules in that it includes an introspection API that can be used as a unified interface for all Class::Meta-generated classes. In this sense, it is an implementation of the "Facade" design pattern.
Download (0.060MB)
Added: 2006-10-05 License: Perl Artistic License Price:
1114 downloads
Class::Std 0.0.8
Class::Std is a Perl module to support for creating standard inside-out classes. more>>
Class::Std is a Perl module to support for creating standard "inside-out" classes.
SYNOPSIS
package MyClass;
use Class::Std;
# Create storage for object attributes...
my %name : ATTR;
my %rank : ATTR;
my %snum : ATTR;
my %public_data : ATTR;
# Handle initialization of objects of this class...
sub BUILD {
my ($self, $obj_ID, $arg_ref) = @_;
$name{$obj_ID} = check_name( $arg_ref->{name} );
$rank{$obj_ID} = check_rank( $arg_ref->{rank} );
$snum{$obj_ID} = _gen_uniq_serial_num();
}
# Handle cleanup of objects of this class...
sub DEMOLISH {
my ($self, $obj_ID) = @_;
_recycle_serial_num( $snum{$obj_ID} );
}
# Handle unknown method calls...
sub AUTOMETHOD {
my ($self, $obj_ID, @other_args) = @_;
# Return any public data...
if ( m/A get_(.*)/ ) { # Method name passed in $_
my $get_what = $1;
return sub {
return $public_data{$obj_ID}{$get_what};
}
}
warn "Cant call $method_name on ", ref $self, " object";
return; # The call is declined by not returning a sub ref
}
This module provides tools that help to implement the "inside out object" class structure in a convenient and standard way.
<<lessSYNOPSIS
package MyClass;
use Class::Std;
# Create storage for object attributes...
my %name : ATTR;
my %rank : ATTR;
my %snum : ATTR;
my %public_data : ATTR;
# Handle initialization of objects of this class...
sub BUILD {
my ($self, $obj_ID, $arg_ref) = @_;
$name{$obj_ID} = check_name( $arg_ref->{name} );
$rank{$obj_ID} = check_rank( $arg_ref->{rank} );
$snum{$obj_ID} = _gen_uniq_serial_num();
}
# Handle cleanup of objects of this class...
sub DEMOLISH {
my ($self, $obj_ID) = @_;
_recycle_serial_num( $snum{$obj_ID} );
}
# Handle unknown method calls...
sub AUTOMETHOD {
my ($self, $obj_ID, @other_args) = @_;
# Return any public data...
if ( m/A get_(.*)/ ) { # Method name passed in $_
my $get_what = $1;
return sub {
return $public_data{$obj_ID}{$get_what};
}
}
warn "Cant call $method_name on ", ref $self, " object";
return; # The call is declined by not returning a sub ref
}
This module provides tools that help to implement the "inside out object" class structure in a convenient and standard way.
Download (0.030MB)
Added: 2006-09-26 License: Perl Artistic License Price:
1124 downloads
Class::Inner 0.1
Class::Inner is a perlish implementation of Java like inner classes. more>>
Class::Inner is a perlish implementation of Java like inner classes.
SYNOPSIS
use Class::Inner;
my $object = Class::Inner->new(
parent => ParentClass,
methods => { method => sub { ... } }, },
constructor => new,
args => [@constructor_args],
);
Yet another implementation of an anonymous class with per object overrideable methods, but with the added attraction of sort of working dispatch to the parent classs method.
METHODS
new HASH
Takes a hash like argument list with the following keys.
parent
The name of the parent class. Note that you can only get single inheritance with this or SUPER wont work.
methods
A hash, keys are method names, values are CODEREFs.
constructor
The name of the constructor method. Defaults to new.
args
An anonymous array of arguments to pass to the constructor. Defaults to an empty list.
Returns an object in an anonymous class which inherits from the parent class. This anonymous class has a couple of extra methods:
SUPER
If you were to pass something like
$obj = Class::Inner->new(
parent => Parent,
methods => { method => sub { ...; $self->SUPER::method(@_) } },
);
then $self-gtSUPER::method almost certainly wouldnt do what you expect, so we provide the SUPER method which dispatches to the parent implementation of the current method. There seems to be no good way of getting the full SUPER:: functionality, but Im working on it.
DESTROY
Because Class::Inner works by creating a whole new class name for your object, it could potentially leak memory if you create a lot of them. So we add a DESTROY method that removes the class from the symbol table once its finished with.
If you need to override a parents DESTROY method, adding a call to Class::Inner::clean_symbol_table(ref $self) to it. Do it at the end of the method or your other method calls wont work.
clean_symbol_table
The helper subroutine that DESTROY uses to remove the class from the symbol table.
new_classname
Returns a name for the next anonymous class.
<<lessSYNOPSIS
use Class::Inner;
my $object = Class::Inner->new(
parent => ParentClass,
methods => { method => sub { ... } }, },
constructor => new,
args => [@constructor_args],
);
Yet another implementation of an anonymous class with per object overrideable methods, but with the added attraction of sort of working dispatch to the parent classs method.
METHODS
new HASH
Takes a hash like argument list with the following keys.
parent
The name of the parent class. Note that you can only get single inheritance with this or SUPER wont work.
methods
A hash, keys are method names, values are CODEREFs.
constructor
The name of the constructor method. Defaults to new.
args
An anonymous array of arguments to pass to the constructor. Defaults to an empty list.
Returns an object in an anonymous class which inherits from the parent class. This anonymous class has a couple of extra methods:
SUPER
If you were to pass something like
$obj = Class::Inner->new(
parent => Parent,
methods => { method => sub { ...; $self->SUPER::method(@_) } },
);
then $self-gtSUPER::method almost certainly wouldnt do what you expect, so we provide the SUPER method which dispatches to the parent implementation of the current method. There seems to be no good way of getting the full SUPER:: functionality, but Im working on it.
DESTROY
Because Class::Inner works by creating a whole new class name for your object, it could potentially leak memory if you create a lot of them. So we add a DESTROY method that removes the class from the symbol table once its finished with.
If you need to override a parents DESTROY method, adding a call to Class::Inner::clean_symbol_table(ref $self) to it. Do it at the end of the method or your other method calls wont work.
clean_symbol_table
The helper subroutine that DESTROY uses to remove the class from the symbol table.
new_classname
Returns a name for the next anonymous class.
Download (0.003MB)
Added: 2007-06-06 License: Perl Artistic License Price:
871 downloads
Exception::Class 1.23
Exception::Class is a Perl module that allows you to declare real exception classes in Perl. more>>
Exception::Class is a Perl module that allows you to declare real exception classes in Perl.
SYNOPSIS
use Exception::Class
( MyException,
AnotherException =>
{ isa => MyException },
YetAnotherException =>
{ isa => AnotherException,
description => These exceptions are related to IPC },
ExceptionWithFields =>
{ isa => YetAnotherException,
fields => [ grandiosity, quixotic ],
alias => throw_fields,
},
);
# try
eval { MyException->throw( error => I feel funny. ) };
my $e;
# catch
if ( $e = Exception::Class->caught(MyException) )
{
warn $e->error, "n", $e->trace->as_string, "n";
warn join , $e->euid, $e->egid, $e->uid, $e->gid, $e->pid, $e->time;
exit;
}
elsif ( $e = Exception::Class->caught(ExceptionWithFields) )
{
$e->quixotic ? do_something_wacky() : do_something_sane();
}
else
{
$e = Exception::Class->caught();
ref $e ? $e->rethrow : die $e;
}
# use an alias - without parens subroutine name is checked at
# compile time
throw_fields error => "No strawberry", grandiosity => "quite a bit";
Exception::Class allows you to declare exception hierarchies in your modules in a "Java-esque" manner.
It features a simple interface allowing programmers to declare exception classes at compile time. It also has a base exception class, Exception::Class::Base, that can be easily extended.
It is designed to make structured exception handling simpler and better by encouraging people to use hierarchies of exceptions in their applications, as opposed to a single catch-all exception class.
This module does not implement any try/catch syntax. Please see the "OTHER EXCEPTION MODULES (try/catch syntax)" section for more information on how to get this syntax.
<<lessSYNOPSIS
use Exception::Class
( MyException,
AnotherException =>
{ isa => MyException },
YetAnotherException =>
{ isa => AnotherException,
description => These exceptions are related to IPC },
ExceptionWithFields =>
{ isa => YetAnotherException,
fields => [ grandiosity, quixotic ],
alias => throw_fields,
},
);
# try
eval { MyException->throw( error => I feel funny. ) };
my $e;
# catch
if ( $e = Exception::Class->caught(MyException) )
{
warn $e->error, "n", $e->trace->as_string, "n";
warn join , $e->euid, $e->egid, $e->uid, $e->gid, $e->pid, $e->time;
exit;
}
elsif ( $e = Exception::Class->caught(ExceptionWithFields) )
{
$e->quixotic ? do_something_wacky() : do_something_sane();
}
else
{
$e = Exception::Class->caught();
ref $e ? $e->rethrow : die $e;
}
# use an alias - without parens subroutine name is checked at
# compile time
throw_fields error => "No strawberry", grandiosity => "quite a bit";
Exception::Class allows you to declare exception hierarchies in your modules in a "Java-esque" manner.
It features a simple interface allowing programmers to declare exception classes at compile time. It also has a base exception class, Exception::Class::Base, that can be easily extended.
It is designed to make structured exception handling simpler and better by encouraging people to use hierarchies of exceptions in their applications, as opposed to a single catch-all exception class.
This module does not implement any try/catch syntax. Please see the "OTHER EXCEPTION MODULES (try/catch syntax)" section for more information on how to get this syntax.
Download (0.016MB)
Added: 2007-05-23 License: Perl Artistic License Price:
884 downloads
C++ base 1.0
C++ base is a base class suite contains several powerful c++ base classes for basic encapsulation. more>>
C++ base is a base class suite contains several powerful c++ base classes for basic encapsulation of low level operating system calls and basic library functions.
Further packages you may access from this page require the installation of this base package
<<lessFurther packages you may access from this page require the installation of this base package
Download (0.10MB)
Added: 2006-10-23 License: GPL (GNU General Public License) Price:
1097 downloads
Class::Date 1.1.9
Class::Date provides a date datatype for Perl. more>>
Class::Date is a perl module, which provides a simple date type for perl.
You can create new Class::Date objects with a constructor from different scalar formats, array refs, and hash refs, and then you can easily manipulate it by the builtin "+" and "-" operators (e.g., $date=date([2001,03,15])+3Y 1s). Relative date types also available.
Enhancements:
- This release adds "ampm" and "meridiam" methods.
<<lessYou can create new Class::Date objects with a constructor from different scalar formats, array refs, and hash refs, and then you can easily manipulate it by the builtin "+" and "-" operators (e.g., $date=date([2001,03,15])+3Y 1s). Relative date types also available.
Enhancements:
- This release adds "ampm" and "meridiam" methods.
Download (0.034MB)
Added: 2006-05-15 License: GPL (GNU General Public License) Price:
1257 downloads
Class::Trait 0.21
Class::Trait is a Perl implementation of Traits in Perl. more>>
Class::Trait is a Perl implementation of Traits in Perl.
SYNOPSIS
# to turn on debugging (do this before
# any other traits are loaded)
use Class::Trait debug;
# nothing happens, but the module is loaded
use Class::Trait;
# loads these two traits and flatten them
# into the current package
use Class::Trait qw(TPrintable TComparable);
# loading a trait and performing some
# trait operations (alias, exclude) first
use Class::Trait (
TPrintable => {
alias => { "stringValue" => "strVal" },
exclude => "stringValue",
},
);
# loading two traits and performing
# a trait operation (exclude) on one
# module to avoid method conflicts
use Class::Trait
TComparable => {
# exclude the basic equality method
# from TComparable and use the ones
# in TEquality instead.
exclude => [ "notEqualTo", "equalTo" ]
},
TEquality #<<less
SYNOPSIS
# to turn on debugging (do this before
# any other traits are loaded)
use Class::Trait debug;
# nothing happens, but the module is loaded
use Class::Trait;
# loads these two traits and flatten them
# into the current package
use Class::Trait qw(TPrintable TComparable);
# loading a trait and performing some
# trait operations (alias, exclude) first
use Class::Trait (
TPrintable => {
alias => { "stringValue" => "strVal" },
exclude => "stringValue",
},
);
# loading two traits and performing
# a trait operation (exclude) on one
# module to avoid method conflicts
use Class::Trait
TComparable => {
# exclude the basic equality method
# from TComparable and use the ones
# in TEquality instead.
exclude => [ "notEqualTo", "equalTo" ]
},
TEquality #<<less
Download (0.033MB)
Added: 2006-10-05 License: Perl Artistic License Price:
1114 downloads
Cgiapp.class.php 2.0.0
Cgiapp.class.php is a port of CGI::Application to PHP. more>>
Cgiapp.class.php is a port of CGI::Application to PHP. Cgiapp.class.php utilizes Smarty as its default templating engine, much as CGI::Application uses HTML::Template, due to its prevalence and acceptance in the PHP community.
Due to PHPs built-in session support, it also adds two methods, s_param() and s_delete(), to handle session parameters.
A number of static methods have also been included to facilitate error handling and array/hash conversion.
<<lessDue to PHPs built-in session support, it also adds two methods, s_param() and s_delete(), to handle session parameters.
A number of static methods have also been included to facilitate error handling and array/hash conversion.
Download (0.16MB)
Added: 2006-06-05 License: GPL (GNU General Public License) Price:
1236 downloads
Class::HPLOO 0.23
Class::HPLOO is an easier way to declare classes on Perl, based in the popular class {...} style and ePod. more>>
Class::HPLOO is an easier way to declare classes on Perl, based in the popular class {...} style and ePod.
USAGE
use Class::HPLOO ;
class Foo extends Bar , Baz {
use LWP::Simple qw(get) ; ## import the method get() to this package.
attr ( array foo_list , int age , string name , foo ) ## define attributes.
vars ($GLOBAL_VAR) ; ## same as: use vars qw($GLOBAL_VAR);
my ($local_var) ;
## constructor/initializer:
sub Foo {
$this->{attr} = $_[0] ;
}
## methods with input variables declared:
sub get_pages ($base , @pages , %options) {
my @htmls ;
if ( $options{proxy} ) { ... }
foreach my $pages_i ( @pages ) {
my $url = "$base/$pages_i" ;
my $html = get($url) ;
push(@htmls , $html) ;
$this->cache($url , $html) ;
}
return @htmls ;
}
## methos like a normal Perl sub:
sub cache {
my ( $url , $html ) = @_ ;
$this->{CACHE}{$url} = $html ;
}
sub attributes_example {
$this->set_foo_list(qw(a b c d e f)) ;
my @l = $this->get_foo_list ;
$this->set_age(30) ;
$this->set_name("Joe") ;
$this->set_foo( time() ) ;
print "NAME: ". $this->get_name ."n" ;
print "AGE: ". $this->get_age ."n" ;
print "FOO: ". $this->get_foo ."n" ;
}
}
## Example of use of the class:
package main ;
my $foo = new Foo(123) ;
$foo->get_pages(http://www.perlmonks.com/, [/index.pl,/foo] , {proxy => localhost:8080}) ;
<<lessUSAGE
use Class::HPLOO ;
class Foo extends Bar , Baz {
use LWP::Simple qw(get) ; ## import the method get() to this package.
attr ( array foo_list , int age , string name , foo ) ## define attributes.
vars ($GLOBAL_VAR) ; ## same as: use vars qw($GLOBAL_VAR);
my ($local_var) ;
## constructor/initializer:
sub Foo {
$this->{attr} = $_[0] ;
}
## methods with input variables declared:
sub get_pages ($base , @pages , %options) {
my @htmls ;
if ( $options{proxy} ) { ... }
foreach my $pages_i ( @pages ) {
my $url = "$base/$pages_i" ;
my $html = get($url) ;
push(@htmls , $html) ;
$this->cache($url , $html) ;
}
return @htmls ;
}
## methos like a normal Perl sub:
sub cache {
my ( $url , $html ) = @_ ;
$this->{CACHE}{$url} = $html ;
}
sub attributes_example {
$this->set_foo_list(qw(a b c d e f)) ;
my @l = $this->get_foo_list ;
$this->set_age(30) ;
$this->set_name("Joe") ;
$this->set_foo( time() ) ;
print "NAME: ". $this->get_name ."n" ;
print "AGE: ". $this->get_age ."n" ;
print "FOO: ". $this->get_foo ."n" ;
}
}
## Example of use of the class:
package main ;
my $foo = new Foo(123) ;
$foo->get_pages(http://www.perlmonks.com/, [/index.pl,/foo] , {proxy => localhost:8080}) ;
Download (0.027MB)
Added: 2007-06-09 License: Perl Artistic License Price:
867 downloads
PHP Greeting card class 1.1
PHP Greeting card class can be used to compose and send greeting cards by email. more>>
PHP Greeting card class can be used to compose and send greeting cards by email.
PHP Greeting card class can compose and send an email message with a greeting either in text, in HTML with an image, or in HTML with Flash content.
The HTML version of the card may include a greeting picture.
<<lessPHP Greeting card class can compose and send an email message with a greeting either in text, in HTML with an image, or in HTML with Flash content.
The HTML version of the card may include a greeting picture.
Download (0.95MB)
Added: 2006-12-21 License: GPL (GNU General Public License) Price:
1043 downloads
Secleted [ 0 ] software to compare
Copyright Notice:
Software piracy is theft, Using crack, password, serial numbers, registration codes, key generators is illegal and prevent future software development. The above c class search only lists software in full, demo and trial versions for free download. Download links are directly from our mirror sites or publisher sites, torrent files or links from rapidshare.com, yousendit.com or megaupload.com are not allowed