subclass
Sponsored Links
Sponsored Links
Secleted [ 0 ] software to compare
Results 1 - 15 of about 262
netclasses 1.06
Netclasses is an asynchronous networking library that works with GNUstep and Mac OS X. more>>
Netclasses is an asynchronous networking library that works with GNUstep and Mac OS X. Out of the box, netclasses gives a nice, asynchronous, and object-oriented interface for IRC, line- based, and raw TCP/IP connections.
Users can easily subclass the raw TCP/IP or line-based interfaces to create asynchronous interfaces for other sorts of connections.
Enhancements:
- Fixes a bug in LineObject where a single byte of non-allocated memory could be read when receiving a blank line.
<<lessUsers can easily subclass the raw TCP/IP or line-based interfaces to create asynchronous interfaces for other sorts of connections.
Enhancements:
- Fixes a bug in LineObject where a single byte of non-allocated memory could be read when receiving a blank line.
Download (0.12MB)
Added: 2006-02-13 License: GPL (GNU General Public License) Price:
1348 downloads
Class::Spiffy 0.15
Class::Spiffy is a Spiffy Framework with No Source Filtering. more>>
Class::Spiffy is a Spiffy Framework with No Source Filtering.
SYNOPSIS
package Keen;
use strict;
use warnings;
use Class::Spiffy -base;
field mirth;
const mood => :-);
sub happy {
my $self = shift;
if ($self->mood eq :-() {
$self->mirth(-1);
print "Cheer up!";
}
super;
}
1;
"Class::Spiffy" is a framework and methodology for doing object oriented (OO) programming in Perl. Class::Spiffy combines the best parts of Exporter.pm, base.pm, mixin.pm and SUPER.pm into one magic foundation class. It attempts to fix all the nits and warts of traditional Perl OO, in a clean, straightforward and (perhaps someday) standard way.
Class::Spiffy borrows ideas from other OO languages like Python, Ruby, Java and Perl 6. It also adds a few tricks of its own.
If you take a look on CPAN, there are a ton of OO related modules. When starting a new project, you need to pick the set of modules that makes most sense, and then you need to use those modules in each of your classes. Class::Spiffy, on the other hand, has everything youll probably need in one module, and you only need to use it once in one of your classes. If you make Class::Spiffy the base class of the basest class in your project, Class::Spiffy will automatically pass all of its magic to all of your subclasses. You may eventually forget that youre even using it!
The most striking difference between Class::Spiffy and other Perl object oriented base classes, is that it has the ability to export things. If you create a subclass of Class::Spiffy, all the things that Class::Spiffy exports will automatically be exported by your subclass, in addition to any more things that you want to export. And if someone creates a subclass of your subclass, all of those things will be exported automatically, and so on. Think of it as "Inherited Exportation", and it uses the familiar Exporter.pm specification syntax.
To use Class::Spiffy or any subclass of Class::Spiffy as a base class of your class, you specify the -base argument to the use command.
use MySpiffyBaseModule -base;
You can also use the traditional use base MySpiffyBaseModule; syntax and everything will work exactly the same. The only caveat is that Class::Spiffy must already be loaded. Thats because Class::Spiffy rewires base.pm on the fly to do all the Spiffy magics.
Class::Spiffy has support for Ruby-like mixins with Perl6-like roles. Just like base you can use either of the following invocations:
use mixin MySpiffyBaseModule;
use MySpiffyBaseModule -mixin;
The second version will only work if the class being mixed in is a subclass of Class::Spiffy. The first version will work in all cases, as long as Class::Spiffy has already been loaded.
To limit the methods that get mixed in, use roles. (Hint: they work just like an Exporter list):
use MySpiffyBaseModule -mixin => qw(:basics x y !foo);
A useful feature of Class::Spiffy is that it exports two functions: field and const that can be used to declare the attributes of your class, and automatically generate accessor methods for them. The only difference between the two functions is that const attributes can not be modified; thus the accessor is much faster.
One interesting aspect of OO programming is when a method calls the same method from a parent class. This is generally known as calling a super method. Perls facility for doing this is butt ugly:
sub cleanup {
my $self = shift;
$self->scrub;
$self->SUPER::cleanup(@_);
}
Class::Spiffy makes it, er, super easy to call super methods. You just use the super function. You dont need to pass it any arguments because it automatically passes them on for you. Heres the same function with Class::Spiffy:
sub cleanup {
my $self = shift;
$self->scrub;
super;
}
Class::Spiffy has a special method for parsing arguments called parse_arguments, that it also uses for parsing its own arguments. You declare which arguments are boolean (singletons) and which ones are paired, with two special methods called boolean_arguments and paired_arguments. Parse arguments pulls out the booleans and pairs and returns them in an anonymous hash, followed by a list of the unmatched arguments.
Finally, Class::Spiffy can export a few debugging functions WWW, XXX, YYY and ZZZ. Each of them produces a YAML dump of its arguments. WWW warns the output, XXX dies with the output, YYY prints the output, and ZZZ confesses the output. If YAML doesnt suit your needs, you can switch all the dumps to Data::Dumper format with the - dumper option.
<<lessSYNOPSIS
package Keen;
use strict;
use warnings;
use Class::Spiffy -base;
field mirth;
const mood => :-);
sub happy {
my $self = shift;
if ($self->mood eq :-() {
$self->mirth(-1);
print "Cheer up!";
}
super;
}
1;
"Class::Spiffy" is a framework and methodology for doing object oriented (OO) programming in Perl. Class::Spiffy combines the best parts of Exporter.pm, base.pm, mixin.pm and SUPER.pm into one magic foundation class. It attempts to fix all the nits and warts of traditional Perl OO, in a clean, straightforward and (perhaps someday) standard way.
Class::Spiffy borrows ideas from other OO languages like Python, Ruby, Java and Perl 6. It also adds a few tricks of its own.
If you take a look on CPAN, there are a ton of OO related modules. When starting a new project, you need to pick the set of modules that makes most sense, and then you need to use those modules in each of your classes. Class::Spiffy, on the other hand, has everything youll probably need in one module, and you only need to use it once in one of your classes. If you make Class::Spiffy the base class of the basest class in your project, Class::Spiffy will automatically pass all of its magic to all of your subclasses. You may eventually forget that youre even using it!
The most striking difference between Class::Spiffy and other Perl object oriented base classes, is that it has the ability to export things. If you create a subclass of Class::Spiffy, all the things that Class::Spiffy exports will automatically be exported by your subclass, in addition to any more things that you want to export. And if someone creates a subclass of your subclass, all of those things will be exported automatically, and so on. Think of it as "Inherited Exportation", and it uses the familiar Exporter.pm specification syntax.
To use Class::Spiffy or any subclass of Class::Spiffy as a base class of your class, you specify the -base argument to the use command.
use MySpiffyBaseModule -base;
You can also use the traditional use base MySpiffyBaseModule; syntax and everything will work exactly the same. The only caveat is that Class::Spiffy must already be loaded. Thats because Class::Spiffy rewires base.pm on the fly to do all the Spiffy magics.
Class::Spiffy has support for Ruby-like mixins with Perl6-like roles. Just like base you can use either of the following invocations:
use mixin MySpiffyBaseModule;
use MySpiffyBaseModule -mixin;
The second version will only work if the class being mixed in is a subclass of Class::Spiffy. The first version will work in all cases, as long as Class::Spiffy has already been loaded.
To limit the methods that get mixed in, use roles. (Hint: they work just like an Exporter list):
use MySpiffyBaseModule -mixin => qw(:basics x y !foo);
A useful feature of Class::Spiffy is that it exports two functions: field and const that can be used to declare the attributes of your class, and automatically generate accessor methods for them. The only difference between the two functions is that const attributes can not be modified; thus the accessor is much faster.
One interesting aspect of OO programming is when a method calls the same method from a parent class. This is generally known as calling a super method. Perls facility for doing this is butt ugly:
sub cleanup {
my $self = shift;
$self->scrub;
$self->SUPER::cleanup(@_);
}
Class::Spiffy makes it, er, super easy to call super methods. You just use the super function. You dont need to pass it any arguments because it automatically passes them on for you. Heres the same function with Class::Spiffy:
sub cleanup {
my $self = shift;
$self->scrub;
super;
}
Class::Spiffy has a special method for parsing arguments called parse_arguments, that it also uses for parsing its own arguments. You declare which arguments are boolean (singletons) and which ones are paired, with two special methods called boolean_arguments and paired_arguments. Parse arguments pulls out the booleans and pairs and returns them in an anonymous hash, followed by a list of the unmatched arguments.
Finally, Class::Spiffy can export a few debugging functions WWW, XXX, YYY and ZZZ. Each of them produces a YAML dump of its arguments. WWW warns the output, XXX dies with the output, YYY prints the output, and ZZZ confesses the output. If YAML doesnt suit your needs, you can switch all the dumps to Data::Dumper format with the - dumper option.
Download (0.024MB)
Added: 2007-06-19 License: Perl Artistic License Price:
857 downloads
fuselagefs 0.0.1
fuselagefs is a project which consists of a C++ wrapper class for FUSE called Fuselagefs. more>>
fuselagefs is a project which consists of a C++ wrapper class for FUSE called Fuselagefs.
fuselagefs consists of a C++ wrapper class for FUSE called Fuselagefs, as well as Delegatefs which is a Fuselagefs subclass that delegates all operations to an underlying base filesystem.
With Delegatefs you can expose dir1 at mountpoint dir2 very easily as a FUSE filesystem. Subclasses of Delegatefs can then be created which add a little extra functionality to the delegation operation but rely on the parent class to perform the work and return errors to FUSE in an appropriate manner. An example subclass is petardfs.
<<lessfuselagefs consists of a C++ wrapper class for FUSE called Fuselagefs, as well as Delegatefs which is a Fuselagefs subclass that delegates all operations to an underlying base filesystem.
With Delegatefs you can expose dir1 at mountpoint dir2 very easily as a FUSE filesystem. Subclasses of Delegatefs can then be created which add a little extra functionality to the delegation operation but rely on the parent class to perform the work and return errors to FUSE in an appropriate manner. An example subclass is petardfs.
Download (0.27MB)
Added: 2007-04-03 License: GPL (GNU General Public License) Price:
934 downloads
Basset::Object 1.04
Basset::Object is a Perl module used to create objects. more>>
Basset::Object is a Perl module used to create objects.
This is my ultimate object creation toolset to date. It has roots in Mail::Bulkmail, Text::Flowchart, and the unreleased abstract object constructors that Ive tooled around with in the past.
If you want an object to be compatible with anything else Ive written, then subclass it off of here.
Of course, you dont have to use this to create subclasses, but youll run the risk of making something with an inconsistent interface vs. the rest of the system. Thatll confuse people and make them unhappy. So I recommend subclassing off of here to be consistent. Of course, you may not like these objects, but they do work well and are consistent. Consistency is very important in interface design, IMHO.
<<lessThis is my ultimate object creation toolset to date. It has roots in Mail::Bulkmail, Text::Flowchart, and the unreleased abstract object constructors that Ive tooled around with in the past.
If you want an object to be compatible with anything else Ive written, then subclass it off of here.
Of course, you dont have to use this to create subclasses, but youll run the risk of making something with an inconsistent interface vs. the rest of the system. Thatll confuse people and make them unhappy. So I recommend subclassing off of here to be consistent. Of course, you may not like these objects, but they do work well and are consistent. Consistency is very important in interface design, IMHO.
Download (0.14MB)
Added: 2007-06-20 License: GPL (GNU General Public License) Price:
856 downloads
mod_cplusplus 1.5.4
mod_cplusplus is a C++ wrapper around apache-2.0. more>>
mod_cplusplus is a C++ wrapper around apache-2.0.
Easily implement object oriented apache-2.0 handlers with C++ including all the standard phases of the request cycle, input filters, output filters, and protocol handlers.
This is a big improvement for a number of reasons:
- C++ modules now only need pure C++, with no kludges to allow apache hooks to invoke C++ methods.
- All request phases and filtering phases are exposed cleanly through object oriented method invocations.
- The core structures (e.g. request_rec) are objectified to encapsulate functionality and provide a clean api.
- Because mod_cplusplus only instanciates your objects once per server, you can easily cache re-used data in the object and all requests to that child will benefit.
Simply subclass from the included baseclasses (e.g. ApacheHandler) and implement whichever phases of the request you are interested in (e.g. check_user_id()) and point mod_cplusplus at it in the config file. No need to hack your own module structure to proxy calls to your objects.
<<lessEasily implement object oriented apache-2.0 handlers with C++ including all the standard phases of the request cycle, input filters, output filters, and protocol handlers.
This is a big improvement for a number of reasons:
- C++ modules now only need pure C++, with no kludges to allow apache hooks to invoke C++ methods.
- All request phases and filtering phases are exposed cleanly through object oriented method invocations.
- The core structures (e.g. request_rec) are objectified to encapsulate functionality and provide a clean api.
- Because mod_cplusplus only instanciates your objects once per server, you can easily cache re-used data in the object and all requests to that child will benefit.
Simply subclass from the included baseclasses (e.g. ApacheHandler) and implement whichever phases of the request you are interested in (e.g. check_user_id()) and point mod_cplusplus at it in the config file. No need to hack your own module structure to proxy calls to your objects.
Download (0.12MB)
Added: 2007-04-09 License: The Apache License Price:
929 downloads
HTML::Seamstress 4.26
HTML::Seamstress is a HTML::Tree subclass for HTML templating via tree rewriting. more>>
HTML::Seamstress is a HTML::Tree subclass for HTML templating via tree rewriting.
SYNOPSIS
HTML::Seamstress provides "fourth generation" dynamic HTML generation (templating).
In the beginning we had...
First generation dynamic HTML production
First generation dynamic HTML production used server-side includes:
< p >Todays date is < !--#echo var="DATE_LOCAL" -- > < /p >
Second generation dynamic HTML production
The next phase of HTML generation saw embedded HTML snippets in Perl code. For example:
sub header {
my $title = shift;
print $title< /title >
< /head >
EOHEADER
}
<<lessSYNOPSIS
HTML::Seamstress provides "fourth generation" dynamic HTML generation (templating).
In the beginning we had...
First generation dynamic HTML production
First generation dynamic HTML production used server-side includes:
< p >Todays date is < !--#echo var="DATE_LOCAL" -- > < /p >
Second generation dynamic HTML production
The next phase of HTML generation saw embedded HTML snippets in Perl code. For example:
sub header {
my $title = shift;
print $title< /title >
< /head >
EOHEADER
}
Download (0.048MB)
Added: 2006-09-14 License: Perl Artistic License Price:
1135 downloads
Persistent::Base 0.52
Persistent::Base is an Abstract Persistent Base Class. more>>
Persistent::Base is an Abstract Persistent Base Class.
SYNOPSIS
### we are a subclass of ... ###
use Persistent::Base;
@ISA = qw(Persistent::Base);
ABSTRACT
This is an abstract class used by the Persistent framework of classes to implement persistence with various types of data stores. This class provides the methods and interface for implementing Persistent classes. Refer to the Persistent documentation for a very thorough introduction to using the Persistent framework of classes.
This class is part of the Persistent base package which is available from:
http://www.bigsnow.org/persistent
ftp://ftp.bigsnow.org/pub/persistent
Before we get started describing the methods in detail, it should be noted that all error handling in this class is done with exceptions. So you should wrap an eval block around all of your code. Please see the Persistent documentation for more information on exception handling in Perl.
ABSTRACT METHODS THAT NEED TO BE OVERRIDDEN IN THE SUBCLASS
datastore -- Sets/Returns the Data Store Parameters
eval {
### set the data store ###
$person->datastore(@args);
### get the data store ###
$href = $person->datastore();
};
croak "Exception caught: $@" if $@;
Returns (and optionally sets) the data store of the object. This method throws Perl execeptions so use it with an eval block.
Setting the data store can involve anything from initializing a connection to opening a file. Getting a data store usually means returning information pertaining to the data store in a useful form, such as a connection to a database or a location of a file.
<<lessSYNOPSIS
### we are a subclass of ... ###
use Persistent::Base;
@ISA = qw(Persistent::Base);
ABSTRACT
This is an abstract class used by the Persistent framework of classes to implement persistence with various types of data stores. This class provides the methods and interface for implementing Persistent classes. Refer to the Persistent documentation for a very thorough introduction to using the Persistent framework of classes.
This class is part of the Persistent base package which is available from:
http://www.bigsnow.org/persistent
ftp://ftp.bigsnow.org/pub/persistent
Before we get started describing the methods in detail, it should be noted that all error handling in this class is done with exceptions. So you should wrap an eval block around all of your code. Please see the Persistent documentation for more information on exception handling in Perl.
ABSTRACT METHODS THAT NEED TO BE OVERRIDDEN IN THE SUBCLASS
datastore -- Sets/Returns the Data Store Parameters
eval {
### set the data store ###
$person->datastore(@args);
### get the data store ###
$href = $person->datastore();
};
croak "Exception caught: $@" if $@;
Returns (and optionally sets) the data store of the object. This method throws Perl execeptions so use it with an eval block.
Setting the data store can involve anything from initializing a connection to opening a file. Getting a data store usually means returning information pertaining to the data store in a useful form, such as a connection to a database or a location of a file.
Download (0.038MB)
Added: 2007-05-18 License: Perl Artistic License Price:
889 downloads
Basset::DB::Table 1.04
Basset::DB::Table is used to define database tables, ways to load that data into memory. more>>
Basset::DB::Table is used to define database tables, ways to load that data into memory and build queries based upon the table information.
SYNOPSIS
For example,
my $table = Basset::DB::Table->new(
name => user,
primary_column => id,
autogenerated => 1,
definition => {
id => SQL_INTEGER,
username => SQL_VARCHAR,
password => SQL_VARCHAR,
name => SQL_VARCHAR
}
);
print $table->insert_query, "n"; print $table->update_query, "n"; print $table->delete_query, "n";
Basset::DB::Table provides an abstract and consistent location for defining database tables, building queries based upon them, and so on. It is rarely (if ever) used directly in code, but is used extensively in packages which subclass from Basset::Object::Persistent.
Any queries returned by the query methods are simply strings that must be prepared by DBI in order bo be used.
<<lessSYNOPSIS
For example,
my $table = Basset::DB::Table->new(
name => user,
primary_column => id,
autogenerated => 1,
definition => {
id => SQL_INTEGER,
username => SQL_VARCHAR,
password => SQL_VARCHAR,
name => SQL_VARCHAR
}
);
print $table->insert_query, "n"; print $table->update_query, "n"; print $table->delete_query, "n";
Basset::DB::Table provides an abstract and consistent location for defining database tables, building queries based upon them, and so on. It is rarely (if ever) used directly in code, but is used extensively in packages which subclass from Basset::Object::Persistent.
Any queries returned by the query methods are simply strings that must be prepared by DBI in order bo be used.
Download (0.14MB)
Added: 2007-08-09 License: Perl Artistic License Price:
807 downloads
Class::DBI::AutoIncrement 0.05
Class::DBI::AutoIncrement is a Perl module to emulate auto-incrementing columns on Class::DBI subclasses. more>>
Class::DBI::AutoIncrement is a Perl module to emulate auto-incrementing columns on Class::DBI subclasses.
SYNOPSIS
Lets assume you have a project making use of Class::DBI. You have implemented a subclass of Class::DBI called MyProject::DBI that opens a connection towards your projects database. You also created a class called MyProject::Book that represents the table Book in your database:
package MyProject::Book;
use base qw(MyProject::DBI);
MyProject::Book->table(book);
MyProject::Book->columns(Primary => qw(seqid));
MyProject::Book->table(Others => qw(author title isbn));
Now, you would like the column seqid of the table Book to be auto-incrementing, but your database unfortunately does not support auto-incrementing sequences. Instead, use Class::DBI::AutoIncrement to set the value of seqid automagically upon each insert():
package MyProject::Book;
use base qw(Class::DBI::AutoIncrement MyProject::DBI);
MyProject::Book->table(book);
MyProject::Book->columns(Primary => qw(seqid));
MyProject::Book->table(Others => qw(author title isbn));
MyProject::Book->autoincrement(seqid);
From now on, when you call:
my $book = Book->insert({author => me, title => my life});
$book gets its seqid field automagically set to the next available value for that column. If you had 3 rows in the table book having seqids 1, 2 and 3, this new inserted row will get the seqid 4 (assuming a default setup).
<<lessSYNOPSIS
Lets assume you have a project making use of Class::DBI. You have implemented a subclass of Class::DBI called MyProject::DBI that opens a connection towards your projects database. You also created a class called MyProject::Book that represents the table Book in your database:
package MyProject::Book;
use base qw(MyProject::DBI);
MyProject::Book->table(book);
MyProject::Book->columns(Primary => qw(seqid));
MyProject::Book->table(Others => qw(author title isbn));
Now, you would like the column seqid of the table Book to be auto-incrementing, but your database unfortunately does not support auto-incrementing sequences. Instead, use Class::DBI::AutoIncrement to set the value of seqid automagically upon each insert():
package MyProject::Book;
use base qw(Class::DBI::AutoIncrement MyProject::DBI);
MyProject::Book->table(book);
MyProject::Book->columns(Primary => qw(seqid));
MyProject::Book->table(Others => qw(author title isbn));
MyProject::Book->autoincrement(seqid);
From now on, when you call:
my $book = Book->insert({author => me, title => my life});
$book gets its seqid field automagically set to the next available value for that column. If you had 3 rows in the table book having seqids 1, 2 and 3, this new inserted row will get the seqid 4 (assuming a default setup).
Download (0.008MB)
Added: 2007-01-25 License: Perl Artistic License Price:
1002 downloads
Class::DBI::Template::Stash 0.03
Class::DBI::Template::Stash is a Perl module with Template::Stash subclass for Class::DBI::Template. more>>
Class::DBI::Template::Stash is a Perl module with Template::Stash subclass for Class::DBI::Template.
SYNOPSIS
package Music::DBI;
use base Class::DBI;
use Class::DBI::Template;
There is nothing you need to do for this module, it is setup for you when you use Class::DBI::Template. It provides a subclass of Template::Stash that overrides its get() method. The new method knows how to find the Class::DBI object that we are rendering, and how to get information out of it for use by the Template module for rendering your template.
<<lessSYNOPSIS
package Music::DBI;
use base Class::DBI;
use Class::DBI::Template;
There is nothing you need to do for this module, it is setup for you when you use Class::DBI::Template. It provides a subclass of Template::Stash that overrides its get() method. The new method knows how to find the Class::DBI object that we are rendering, and how to get information out of it for use by the Template module for rendering your template.
Download (0.010MB)
Added: 2006-10-05 License: Perl Artistic License Price:
1114 downloads
GuiLoader 2.10.0
GuiLoader is a high-performance and compact GuiXml loader library. more>>
GuiLoader is a high-performance and compact GuiXml loader library. This library allows GTK+ applications to create GUI widgets and objects at run-time from GuiXml resource files.
GuiLoader is written in C language as a GObject subclass and has a trivial language-independent API. GuiLoader was designed to be easily wrapped for any language that has GTK+ bindings.
<<lessGuiLoader is written in C language as a GObject subclass and has a trivial language-independent API. GuiLoader was designed to be easily wrapped for any language that has GTK+ bindings.
Download (0.25MB)
Added: 2007-01-07 License: GPL (GNU General Public License) Price:
1022 downloads
Netscape::Bookmarks 1.94
Netscape::Bookmarks is a Perl module to parse, manipulate, or create Netscape Bookmarks files. more>>
Netscape::Bookmarks is a Perl module to parse, manipulate, or create Netscape Bookmarks files.
SYNOPSIS
use Netscape::Bookmarks;
# parse an existing file
my $bookmarks = Netscape::Bookmarks->new( $bookmarks_file );
# -- OR --
# start a new Bookmarks structure
my $bookmarks = Netscape::Bookmarks->new;
# print a Netscape compatible file
print $bookmarks->as_string;
[ Note: I wrote this a long time ago. Although this should still work with "Netscape" browsers, Mozilla browsers do the same thing. When the docs say "Netscape", I mean either branch of browsers. ]
The Netscape bookmarks file has several basic components:
title
folders (henceforth called categories)
links
aliases
separators
On disk, Netscape browsers store this information in HTML. In the browser, it is displayed under the "Bookmarks" menu. The data can be manipulated through the browser interface.
This module allows one to manipulate the bookmarks file programmatically. One can parse an existing bookmarks file, manipulate the information, and write it as a bookmarks file again. Furthermore, one can skip the parsing step to create a new bookmarks file and write it in the proper format to be used by a Netscape browser.
The Bookmarks module simply parses the bookmarks file passed to it as the only argument to the constructor:
my $bookmarks = Netscape::Bookmarks->new( $bookmarks_file );
The returned object is a Netscape::Bookmarks::Category object, since the bookmark file is simply a collection of categories that contain any of the components listed above. The top level (i.e. root) category is treated specially and defines the title of the bookmarks file.
HTML::Parser is used behind the scenes to build the data structure (a simple list of lists (of lists ...)). Netscape::Bookmarks::Category, Netscape::Bookmarks::Link, Netscape::Bookmarks::Alias, or Netscape::Bookmarks::Separator objects can be stored in a Netscape::Bookmarks::Category object. Netscape::Bookmarks::Alias objects are treated as references to Netscape::Bookmarks::Link objects, so changes to one affect the other.
Methods for manipulating this object are in the Netscape::Bookmarks::Category module. Methods for dealing with the objects contained in a Netscape::Bookmarks::Category object are in their appropriate modules.
new( [filename] )
The constructor takes a filename as its single (optional) argument. If you do not give new an argument, an empty Netscape::Bookmarks::Category object is returned so that you can start to build up your new Bookmarks file. If the file that you name does not exist, undef is returned in scalar context and an empty list is returned in list context. If the file does exist it is parsed with HTML::Parser with the internal parser subclass defined in the same package as new. If the parsing finishes without error a Netscape::Bookmarks::Category object is returned.
parse_string
Method for HTML::Parser subclass method
start
Method for HTML::Parser subclass method
text
Method for HTML::Parser subclass method
end
Method for HTML::Parser subclass method
my_init
Method for HTML::Parser subclass method
<<lessSYNOPSIS
use Netscape::Bookmarks;
# parse an existing file
my $bookmarks = Netscape::Bookmarks->new( $bookmarks_file );
# -- OR --
# start a new Bookmarks structure
my $bookmarks = Netscape::Bookmarks->new;
# print a Netscape compatible file
print $bookmarks->as_string;
[ Note: I wrote this a long time ago. Although this should still work with "Netscape" browsers, Mozilla browsers do the same thing. When the docs say "Netscape", I mean either branch of browsers. ]
The Netscape bookmarks file has several basic components:
title
folders (henceforth called categories)
links
aliases
separators
On disk, Netscape browsers store this information in HTML. In the browser, it is displayed under the "Bookmarks" menu. The data can be manipulated through the browser interface.
This module allows one to manipulate the bookmarks file programmatically. One can parse an existing bookmarks file, manipulate the information, and write it as a bookmarks file again. Furthermore, one can skip the parsing step to create a new bookmarks file and write it in the proper format to be used by a Netscape browser.
The Bookmarks module simply parses the bookmarks file passed to it as the only argument to the constructor:
my $bookmarks = Netscape::Bookmarks->new( $bookmarks_file );
The returned object is a Netscape::Bookmarks::Category object, since the bookmark file is simply a collection of categories that contain any of the components listed above. The top level (i.e. root) category is treated specially and defines the title of the bookmarks file.
HTML::Parser is used behind the scenes to build the data structure (a simple list of lists (of lists ...)). Netscape::Bookmarks::Category, Netscape::Bookmarks::Link, Netscape::Bookmarks::Alias, or Netscape::Bookmarks::Separator objects can be stored in a Netscape::Bookmarks::Category object. Netscape::Bookmarks::Alias objects are treated as references to Netscape::Bookmarks::Link objects, so changes to one affect the other.
Methods for manipulating this object are in the Netscape::Bookmarks::Category module. Methods for dealing with the objects contained in a Netscape::Bookmarks::Category object are in their appropriate modules.
new( [filename] )
The constructor takes a filename as its single (optional) argument. If you do not give new an argument, an empty Netscape::Bookmarks::Category object is returned so that you can start to build up your new Bookmarks file. If the file that you name does not exist, undef is returned in scalar context and an empty list is returned in list context. If the file does exist it is parsed with HTML::Parser with the internal parser subclass defined in the same package as new. If the parsing finishes without error a Netscape::Bookmarks::Category object is returned.
parse_string
Method for HTML::Parser subclass method
start
Method for HTML::Parser subclass method
text
Method for HTML::Parser subclass method
end
Method for HTML::Parser subclass method
my_init
Method for HTML::Parser subclass method
Download (0.023MB)
Added: 2007-03-24 License: Perl Artistic License Price:
947 downloads
Netscape::HistoryURL 3.01
Netscape::HistoryURL is a URI::URL subclass with Netscape history information. more>>
Netscape::HistoryURL is a URI::URL subclass with Netscape history information.
SYNOPSIS
use Netscape::HistoryURL;
$url = new Netscape::HistoryURL(http://foobar.com/,
LAST, FIRST, COUNT, EXPIRE, TITLE);
The Netscape::HistoryURL module subclasses URI::URL to provide a URL class with methods for accessing the information which is stored in Netscapes history database.
The history database is used to keep track of all URLs you have visited. This is used to color previously visited URLs different, for example. The information stored in the history database depends on the version of Netscape being used.
<<lessSYNOPSIS
use Netscape::HistoryURL;
$url = new Netscape::HistoryURL(http://foobar.com/,
LAST, FIRST, COUNT, EXPIRE, TITLE);
The Netscape::HistoryURL module subclasses URI::URL to provide a URL class with methods for accessing the information which is stored in Netscapes history database.
The history database is used to keep track of all URLs you have visited. This is used to color previously visited URLs different, for example. The information stored in the history database depends on the version of Netscape being used.
Download (0.008MB)
Added: 2007-03-24 License: Perl Artistic License Price:
945 downloads
Class::MakeMethods::Template 1.01
Class::MakeMethods::Template package contains extensible code templates. more>>
Class::MakeMethods::Template package contains extensible code templates.
SYNOPSIS
package MyObject;
use Class::MakeMethods::Template::Hash (
new => new,
string => foo,
number => bar,
);
my $obj = MyObject->new( foo => "Foozle", bar => 23 );
print $obj->foo();
$obj->bar(42);
MOTIVATION
If you compare the source code of some of the closure-generating methods provided by other subclasses of Class::MakeMethods, such as the hash accessors provided by the various Standard::* subclasses, you will notice a fair amount of duplication. This module provides a way of assembling common pieces of code to facilitate support the maintenance of much larger libraries of generated methods.
This module extends the Class::MakeMethods framework by providing an abstract superclass for extensible code-templating method generators.
Common types of methods are generalized into template definitions. For example, Template::Generics new provides a template for methods that create object instances, while Template::Generics scalar is a template for methods that allow you to get and set individual scalar values.
Thse definitions are then re-used and modified by various template subclasses. For example, the Template::Hash subclass supports blessed-hash objects, while the Template::Global subclass supports shared data; each of them includes an appropriate version of the scalar accessor template for those object types.
Each template defines one or more behaviors, individual methods which can be installed in a calling package, and interfaces, which select from those behaviours and indicate the names to install the methods under.
Each individual meta-method defined by a calling package requires a method name, and may optionally include other key-value parameters, which can control the operation of some meta-methods.
<<lessSYNOPSIS
package MyObject;
use Class::MakeMethods::Template::Hash (
new => new,
string => foo,
number => bar,
);
my $obj = MyObject->new( foo => "Foozle", bar => 23 );
print $obj->foo();
$obj->bar(42);
MOTIVATION
If you compare the source code of some of the closure-generating methods provided by other subclasses of Class::MakeMethods, such as the hash accessors provided by the various Standard::* subclasses, you will notice a fair amount of duplication. This module provides a way of assembling common pieces of code to facilitate support the maintenance of much larger libraries of generated methods.
This module extends the Class::MakeMethods framework by providing an abstract superclass for extensible code-templating method generators.
Common types of methods are generalized into template definitions. For example, Template::Generics new provides a template for methods that create object instances, while Template::Generics scalar is a template for methods that allow you to get and set individual scalar values.
Thse definitions are then re-used and modified by various template subclasses. For example, the Template::Hash subclass supports blessed-hash objects, while the Template::Global subclass supports shared data; each of them includes an appropriate version of the scalar accessor template for those object types.
Each template defines one or more behaviors, individual methods which can be installed in a calling package, and interfaces, which select from those behaviours and indicate the names to install the methods under.
Each individual meta-method defined by a calling package requires a method name, and may optionally include other key-value parameters, which can control the operation of some meta-methods.
Download (0.16MB)
Added: 2007-06-18 License: Perl Artistic License Price:
859 downloads
Test::CPANpm 0.010
Test::CPANpm is a Perl module to test a distributions interaction with CPAN before uploading. more>>
Test::CPANpm is a Perl module to test a distributions interaction with CPAN before uploading.
SYNOPSIS
use Test::CPANpm;
use Test::More qw(no_plan);
cpan_depends_ok(
[CGI, Module::Build, Acme::Wabbit],
got the right dependancies
);
cpan_depends_ok_force_missing(
[Some::Module::Build::Subclass, CGI, Module::Build, Acme::Wabbit],
[Some::Module::Build::Subclass],
got dependancies even though our Module::Build subclass is missing
);
Test::CPANpm fools CPAN.pm into thinking it has downloaded and unpacked your package, then has it attempt to generate a Makefile or Build script. After this process completes, it asks your CPAN module what dependancies it thinks exist.
If you just want to make sure your distribution is packaged in a way that is good for CPAN, consider using Test::Distribution instead. The main time that Test::CPANpm is useful is when you depend on modules inside your Makefile.PL or Build.PL script and you want to make sure that you degrade gracefully if those modules are not available.
<<lessSYNOPSIS
use Test::CPANpm;
use Test::More qw(no_plan);
cpan_depends_ok(
[CGI, Module::Build, Acme::Wabbit],
got the right dependancies
);
cpan_depends_ok_force_missing(
[Some::Module::Build::Subclass, CGI, Module::Build, Acme::Wabbit],
[Some::Module::Build::Subclass],
got dependancies even though our Module::Build subclass is missing
);
Test::CPANpm fools CPAN.pm into thinking it has downloaded and unpacked your package, then has it attempt to generate a Makefile or Build script. After this process completes, it asks your CPAN module what dependancies it thinks exist.
If you just want to make sure your distribution is packaged in a way that is good for CPAN, consider using Test::Distribution instead. The main time that Test::CPANpm is useful is when you depend on modules inside your Makefile.PL or Build.PL script and you want to make sure that you degrade gracefully if those modules are not available.
Download (0.008MB)
Added: 2007-05-03 License: Perl Artistic License Price:
904 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 subclass 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