rose html objects 0.547
Sponsored Links
Sponsored Links
Secleted [ 0 ] software to compare
Results 1 - 15 of about 4857
Rose::HTML::Objects 0.547
Rose::HTML::Objects is a Perl object-oriented interfaces for HTML. more>>
Rose::HTML::Objects is a Perl object-oriented interfaces for HTML.
SYNOPSIS
use Rose::HTML::Form;
$form = Rose::HTML::Form->new(action => /foo,
method => post);
$form->add_fields
(
name => { type => text, size => 20, required => 1 },
height => { type => text, size => 5, maxlength => 5 },
bday => { type => datetime },
);
$form->params(name => John, height => 6ft, bday => 01/24/1984);
$form->init_fields();
$bday = $form->field(bday)->internal_value; # DateTime object
print $bday->strftime(%A); # Tuesday
print $form->field(bday)->html;
The Rose::HTML::Object::* family of classes represent HTML tags, or groups of tags. These objects allow HTML to be arbitrarily manipulated, then serialized to actual HTML (or XHTML). Currently, the process only works in one direction. Objects cannot be constructed from their serialized representations. In practice, given the purpose of these modules, this is not an important limitation.
Any HTML tag can theoretically be represented by a Rose::HTML::Object-derived class, but this family of modules was originally motivated by a desire to simplify the use of HTML forms.
The form/field object interfaces have been heavily abstracted to allow for input and output filtering, inflation/deflation of values, and compound fields (fields that contain other fields). The classes are also designed to be subclassed. The creation of custom form and field subclasses is really the "big win" for these modules.
There is also a simple image tag class which is useful for auto-populating the width and height attributes of img tags. Future releases may include object representations of other HTML tags. Contributions are welcome.
<<lessSYNOPSIS
use Rose::HTML::Form;
$form = Rose::HTML::Form->new(action => /foo,
method => post);
$form->add_fields
(
name => { type => text, size => 20, required => 1 },
height => { type => text, size => 5, maxlength => 5 },
bday => { type => datetime },
);
$form->params(name => John, height => 6ft, bday => 01/24/1984);
$form->init_fields();
$bday = $form->field(bday)->internal_value; # DateTime object
print $bday->strftime(%A); # Tuesday
print $form->field(bday)->html;
The Rose::HTML::Object::* family of classes represent HTML tags, or groups of tags. These objects allow HTML to be arbitrarily manipulated, then serialized to actual HTML (or XHTML). Currently, the process only works in one direction. Objects cannot be constructed from their serialized representations. In practice, given the purpose of these modules, this is not an important limitation.
Any HTML tag can theoretically be represented by a Rose::HTML::Object-derived class, but this family of modules was originally motivated by a desire to simplify the use of HTML forms.
The form/field object interfaces have been heavily abstracted to allow for input and output filtering, inflation/deflation of values, and compound fields (fields that contain other fields). The classes are also designed to be subclassed. The creation of custom form and field subclasses is really the "big win" for these modules.
There is also a simple image tag class which is useful for auto-populating the width and height attributes of img tags. Future releases may include object representations of other HTML tags. Contributions are welcome.
Download (0.13MB)
Added: 2007-03-26 License: Perl Artistic License Price:
942 downloads
HTML Objects 1.2.4
HTML Objects is a Perl module library for turning HTML tags into Perl objects. more>>
HTML Objects is a Perl module library for turning HTML tags into Perl objects. HTML Objects allows Web pages to be manipulated as a data structure rather than text.
Once manipulation is done, the entire page is generated via depth-first recursion.
<<lessOnce manipulation is done, the entire page is generated via depth-first recursion.
Download (0.025MB)
Added: 2006-05-09 License: GPL (GNU General Public License) Price:
1263 downloads
Rose::Object 0.84
Rose::Object is a simple object base class. more>>
Rose::Object is a simple object base class.
SYNOPSIS
package MyObject;
use Rose::Object;
our @ISA = qw(Rose::Object);
sub foo { ... }
sub bar { ... }
...
my $o = MyObject->new(foo => abc, bar => 5);
...
Rose::Object is a generic object base class. It provides very little functionality, but a healthy dose of convention.
METHODS
new PARAMS
Constructs a new, empty, hash-based object based on PARAMS, where PARAMS are name/value pairs, and then calls init (see below), passing PARAMS to it unmodified.
init PARAMS
Given a list of name/value pairs in PARAMS, calls the object method of each name, passing the corresponding value as an argument. The methods are called in the order that they appear in PARAMS. For example:
$o->init(foo => 1, bar => 2);
is equivalent to the sequence:
$o->foo(1);
$o->bar(2);
<<lessSYNOPSIS
package MyObject;
use Rose::Object;
our @ISA = qw(Rose::Object);
sub foo { ... }
sub bar { ... }
...
my $o = MyObject->new(foo => abc, bar => 5);
...
Rose::Object is a generic object base class. It provides very little functionality, but a healthy dose of convention.
METHODS
new PARAMS
Constructs a new, empty, hash-based object based on PARAMS, where PARAMS are name/value pairs, and then calls init (see below), passing PARAMS to it unmodified.
init PARAMS
Given a list of name/value pairs in PARAMS, calls the object method of each name, passing the corresponding value as an argument. The methods are called in the order that they appear in PARAMS. For example:
$o->init(foo => 1, bar => 2);
is equivalent to the sequence:
$o->foo(1);
$o->bar(2);
Download (0.028MB)
Added: 2007-05-21 License: Perl Artistic License Price:
886 downloads
Rose::HTML::Form 0.53
Rose::HTML::Form is a HTML form base class. more>>
Rose::HTML::Form is a HTML form base class.
SYNOPSIS
package PersonForm;
use Rose::HTML::Form;
our @ISA = qw(Rose::HTML::Form);
use Person;
sub build_form
{
my($self) = shift;
$self->add_fields
(
name => { type => text, size => 25, required => 1 },
email => { type => email, size => 50, required => 1 },
phone => { type => phone },
);
}
sub validate
{
my($self) = shift;
# Base class will validate individual fields in isolation,
# confirming that all required fields are filled in, and that
# the email address and phone number are formatted correctly.
my $ok = $self->SUPER::validate(@_);
return $ok unless($ok);
# Inter-field validation goes here
if($self->field(name)->internal_value ne John Doe &&
$self->field(phone)->internal_value =~ /^555/)
{
$self->error(Only John Doe can have a 555 phone number.);
return 0;
}
return 1;
}
sub init_with_person # give a friendlier name to a base-class method
{
my($self, $person) = @_;
$self->init_with_object($person);
}
sub person_from_form
{
my($self) = shift;
# Base class method does most of the work
my $person = $self->object_from_form(class => Person);
# Now fill in the non-obvious details...
# e.g., set alt phone to be the same as the regular phone
$person->alt_phone($self->field(phone)->internal_value);
return $person;
}
...
#
# Sample usage in a hypothetical web application
#
$form = PersonForm->new;
if(...)
{
# Get query parameters in a hash ref and pass to the form
my $params = MyWebServer->get_query_params();
$form->params($params);
# ...or initialize form params from a CGI object
# $form->params_from_cgi($cgi); # $cgi "isa" CGI
# ...or initialize params from an Apache request object
# (mod_perl 1 and 2 both supported)
# $form->params_from_apache($r);
# Initialize the fields based on params
$form->init_fields();
unless($form->validate)
{
return error_page(error => $form->error);
}
$person = $form->person_from_form; # $person is a Person object
do_something_with($person);
...
}
else
{
$person = ...; # Get or create a Person object somehow
# Initialize the form with the Person object
$form->init_with_person($person);
# Pass the initialized form object to the template
display_page(form => $form);
}
...
Rose::HTML::Form is more than just an object representation of the HTML tag. It is meant to be a base class for custom form classes that can be initialized with and return "rich" values such as objects, or collections of objects.
Building up a reusable library of form classes is extremely helpful when building large web applications with forms that may appear in many different places. Similar forms can inherit from a common subclass, and forms may be nested.
This class inherits from, and follows the conventions of, Rose::HTML::Object. Inherited methods that are not overridden will not be documented a second time here. See the Rose::HTML::Object documentation for more information.
<<lessSYNOPSIS
package PersonForm;
use Rose::HTML::Form;
our @ISA = qw(Rose::HTML::Form);
use Person;
sub build_form
{
my($self) = shift;
$self->add_fields
(
name => { type => text, size => 25, required => 1 },
email => { type => email, size => 50, required => 1 },
phone => { type => phone },
);
}
sub validate
{
my($self) = shift;
# Base class will validate individual fields in isolation,
# confirming that all required fields are filled in, and that
# the email address and phone number are formatted correctly.
my $ok = $self->SUPER::validate(@_);
return $ok unless($ok);
# Inter-field validation goes here
if($self->field(name)->internal_value ne John Doe &&
$self->field(phone)->internal_value =~ /^555/)
{
$self->error(Only John Doe can have a 555 phone number.);
return 0;
}
return 1;
}
sub init_with_person # give a friendlier name to a base-class method
{
my($self, $person) = @_;
$self->init_with_object($person);
}
sub person_from_form
{
my($self) = shift;
# Base class method does most of the work
my $person = $self->object_from_form(class => Person);
# Now fill in the non-obvious details...
# e.g., set alt phone to be the same as the regular phone
$person->alt_phone($self->field(phone)->internal_value);
return $person;
}
...
#
# Sample usage in a hypothetical web application
#
$form = PersonForm->new;
if(...)
{
# Get query parameters in a hash ref and pass to the form
my $params = MyWebServer->get_query_params();
$form->params($params);
# ...or initialize form params from a CGI object
# $form->params_from_cgi($cgi); # $cgi "isa" CGI
# ...or initialize params from an Apache request object
# (mod_perl 1 and 2 both supported)
# $form->params_from_apache($r);
# Initialize the fields based on params
$form->init_fields();
unless($form->validate)
{
return error_page(error => $form->error);
}
$person = $form->person_from_form; # $person is a Person object
do_something_with($person);
...
}
else
{
$person = ...; # Get or create a Person object somehow
# Initialize the form with the Person object
$form->init_with_person($person);
# Pass the initialized form object to the template
display_page(form => $form);
}
...
Rose::HTML::Form is more than just an object representation of the HTML tag. It is meant to be a base class for custom form classes that can be initialized with and return "rich" values such as objects, or collections of objects.
Building up a reusable library of form classes is extremely helpful when building large web applications with forms that may appear in many different places. Similar forms can inherit from a common subclass, and forms may be nested.
This class inherits from, and follows the conventions of, Rose::HTML::Object. Inherited methods that are not overridden will not be documented a second time here. See the Rose::HTML::Object documentation for more information.
Download (0.10MB)
Added: 2006-09-29 License: Perl Artistic License Price:
1120 downloads
Rose::DB::Object::Helpers 0.764
Rose::DB::Object::Helpers is a mix-in class containing convenience methods for Rose::DB::Object. more>>
Rose::DB::Object::Helpers is a mix-in class containing convenience methods for Rose::DB::Object.
SYNOPSIS
package MyDBObject;
use Rose::DB::Object;
our @ISA = qw(Rose::DB::Object);
use Rose::DB::Object::Helpers clone,
{ load_or_insert => find_or_create };
...
$obj = MyDBObject->new(id => 123);
$obj->find_or_create();
$obj2 = $obj->clone;
Rose::DB::Object::Helpers provides convenience methods from use with Rose::DB::Object-derived classes. These methods do not exist in Rose::DB::Object in order to keep the method namespace clean. (Each method added to Rose::DB::Object is another potential naming conflict with a column accessor.)
This class inherits from Rose::DB::Object::MixIn. See the Rose::DB::Object::MixIn documentation for a full explanation of how to import methods from this class. The helper methods themselves are described below.
<<lessSYNOPSIS
package MyDBObject;
use Rose::DB::Object;
our @ISA = qw(Rose::DB::Object);
use Rose::DB::Object::Helpers clone,
{ load_or_insert => find_or_create };
...
$obj = MyDBObject->new(id => 123);
$obj->find_or_create();
$obj2 = $obj->clone;
Rose::DB::Object::Helpers provides convenience methods from use with Rose::DB::Object-derived classes. These methods do not exist in Rose::DB::Object in order to keep the method namespace clean. (Each method added to Rose::DB::Object is another potential naming conflict with a column accessor.)
This class inherits from Rose::DB::Object::MixIn. See the Rose::DB::Object::MixIn documentation for a full explanation of how to import methods from this class. The helper methods themselves are described below.
Download (0.47MB)
Added: 2007-07-18 License: Perl Artistic License Price:
828 downloads
Pod::HTML_Elements 0.05
Pod::HTML_Elements is a Perl module to convert POD to tree of LWPs HTML::Element and hence HTML or PostScript. more>>
Pod::HTML_Elements is a Perl module to convert POD to tree of LWPs HTML::Element and hence HTML or PostScript.
SYNOPSIS
use Pod::HTML_Elements;
my $parser = new Pod::HTML_Elements;
$parser->parse_from_file($pod,foo.html);
my $parser = new Pod::HTML_Elements PostScript => 1;
$parser->parse_from_file($pod,foo.ps);
Pod::HTML_Elements is subclass of Pod::Parser. As the pod is parsed a tree of HTML::Element objects is built to represent HTML for the pod.
At the end of each pod HTML or PostScript representation is written to the output file.
<<lessSYNOPSIS
use Pod::HTML_Elements;
my $parser = new Pod::HTML_Elements;
$parser->parse_from_file($pod,foo.html);
my $parser = new Pod::HTML_Elements PostScript => 1;
$parser->parse_from_file($pod,foo.ps);
Pod::HTML_Elements is subclass of Pod::Parser. As the pod is parsed a tree of HTML::Element objects is built to represent HTML for the pod.
At the end of each pod HTML or PostScript representation is written to the output file.
Download (0.009MB)
Added: 2006-08-23 License: Perl Artistic License Price:
1157 downloads
Rose::DateTime 0.532
Rose::DateTime is a Perl module with DateTime helper functions and objects. more>>
Rose::DateTime is a Perl module with DateTime helper functions and objects.
SYNOPSIS
use Rose::DateTime::Util qw(:all);
$now = parse_date(now);
$then = parse_date(12/25/2001 6pm);
$date_text = format_date($then, "%D at %T %p");
...
use Rose::DateTime::Parser;
$parser = Rose::DateTime::Parser->new(time_zone => UTC);
$date = $parser->parse_date(12/25/1999);
The Rose::DateTime::* modules provide a few convenience functions and objects for use with DateTime dates.
Rose::DateTime::Util contains a simple date parser and a slightly customized date formatter.
Rose::DateTime::Parser encapsulates a date parser with an associated default time zone.
This module (Rose::DateTime) exists mostly to provide a version number for CPAN. See the individual modules for some actual documentation.
<<lessSYNOPSIS
use Rose::DateTime::Util qw(:all);
$now = parse_date(now);
$then = parse_date(12/25/2001 6pm);
$date_text = format_date($then, "%D at %T %p");
...
use Rose::DateTime::Parser;
$parser = Rose::DateTime::Parser->new(time_zone => UTC);
$date = $parser->parse_date(12/25/1999);
The Rose::DateTime::* modules provide a few convenience functions and objects for use with DateTime dates.
Rose::DateTime::Util contains a simple date parser and a slightly customized date formatter.
Rose::DateTime::Parser encapsulates a date parser with an associated default time zone.
This module (Rose::DateTime) exists mostly to provide a version number for CPAN. See the individual modules for some actual documentation.
Download (0.011MB)
Added: 2007-05-21 License: GPL (GNU General Public License) Price:
886 downloads
Rose::DB::Object::Tutorial 0.765
Rose::DB::Object::Tutorial is a guided tour of the basics of Rose::DB::Object. more>>
Rose::DB::Object::Tutorial is a guided tour of the basics of Rose::DB::Object.
INTRODUCTION
This document provides a step-by-step introduction to the Rose::DB::Object module distribution. It demonstrates all of the important features using a semi-realistic example database. This tutorial does not replace the actual documentation for each module, however. The "reference" documentation found in each ".pm" file is still essential, and contains some good examples of its own.
This tutorial provides a gradual introduction to Rose::DB::Object. It also describes "best practices" for using Rose::DB::Object in the most robust, maintainable manner. If youre just trying to get a feel for whats possible, you can skip to the end and take a look at the completed example database and associated Perl code. But I recommend reading the tutorial from start to finish at least once.
The examples will start simple and get progressively more complex. You, the developer, have to decide which level of complexity or abstraction is appropriate for your particular task.
CONVENTIONS
Some of the examples in this tutorial will use the fictional My:: namespace prefix. Some will use no prefix at all. Your code should use whatever namespace you deem appropriate. Usually, it will be something like MyCorp::MyProject:: (i.e., your corporation, organization, and/or project). Ive chosen to use My:: or to omit the prefix entirely simply because this produces shorter class names, which will help this tutorial stay within an 80-column width.
For the sake of brevity, the use strict directive and associated "my" declarations have also been omitted from the example code. Needless to say, you should always use strict in your actual code.
Similarly, the traditional "1;" true value used at the end of each ".pm" file has been omitted from the examples. Dont forget to add this to the end of your actual Perl module files.
Although most of the examples in this tutorial use the base.pm module to set up inheritance, directly modifying the @ISA package variable usually works just as well. In situations where there are circular relationships between classes, the use base ... form may be preferable because it runs at compile-time, whereas @ISA modification happens at run-time. In either case, its a good idea to set up inheritance as early as possible in each module.
package Product;
# Set up inheritance first
use base qw(Rose::DB::Object);
# Then do other stuff...
...
<<lessINTRODUCTION
This document provides a step-by-step introduction to the Rose::DB::Object module distribution. It demonstrates all of the important features using a semi-realistic example database. This tutorial does not replace the actual documentation for each module, however. The "reference" documentation found in each ".pm" file is still essential, and contains some good examples of its own.
This tutorial provides a gradual introduction to Rose::DB::Object. It also describes "best practices" for using Rose::DB::Object in the most robust, maintainable manner. If youre just trying to get a feel for whats possible, you can skip to the end and take a look at the completed example database and associated Perl code. But I recommend reading the tutorial from start to finish at least once.
The examples will start simple and get progressively more complex. You, the developer, have to decide which level of complexity or abstraction is appropriate for your particular task.
CONVENTIONS
Some of the examples in this tutorial will use the fictional My:: namespace prefix. Some will use no prefix at all. Your code should use whatever namespace you deem appropriate. Usually, it will be something like MyCorp::MyProject:: (i.e., your corporation, organization, and/or project). Ive chosen to use My:: or to omit the prefix entirely simply because this produces shorter class names, which will help this tutorial stay within an 80-column width.
For the sake of brevity, the use strict directive and associated "my" declarations have also been omitted from the example code. Needless to say, you should always use strict in your actual code.
Similarly, the traditional "1;" true value used at the end of each ".pm" file has been omitted from the examples. Dont forget to add this to the end of your actual Perl module files.
Although most of the examples in this tutorial use the base.pm module to set up inheritance, directly modifying the @ISA package variable usually works just as well. In situations where there are circular relationships between classes, the use base ... form may be preferable because it runs at compile-time, whereas @ISA modification happens at run-time. In either case, its a good idea to set up inheritance as early as possible in each module.
package Product;
# Set up inheritance first
use base qw(Rose::DB::Object);
# Then do other stuff...
...
Download (0.47MB)
Added: 2007-08-14 License: Perl Artistic License Price:
801 downloads
Database of Managed Objects 2.4 Beta
DMO stands for Database of Managed Objects. more>>
DMO stands for "Database of Managed Objects." This is a tool for documenting all objects within a data center.
Database of Managed Objects provides an object-based overlay on a MySQL database, with a Web-based interface, which allows new objects to be defined in a hierarchy.
Each object can have attributes defined, which are inherited by objects below in the hierarchy. Information can be imported in CSV or XML format, and reports can be produced in XML, CSV, PDF and HTML formats.
DMO uses PHP and MySQL to support documentation of all network and system objects within your computing environment. It offers a Web interface that enables easy navigation through objects, instances and attributes, with XML and access controls.
Enhancements:
- This is the first significant release of DMO for nearly two years.
- It works with Linux and Windows (XAMPP), but should work well with any LAMP stack including PHP4.
- New features include much more graphical viewing, as well as mapping objects onto maps with drill-down to additional layers of maps following dependency trails, a new Flash viewer for browsing through objects, and the ability to create chains of objects based on any attribute type (where any other object can be an attribute of any other object).
<<lessDatabase of Managed Objects provides an object-based overlay on a MySQL database, with a Web-based interface, which allows new objects to be defined in a hierarchy.
Each object can have attributes defined, which are inherited by objects below in the hierarchy. Information can be imported in CSV or XML format, and reports can be produced in XML, CSV, PDF and HTML formats.
DMO uses PHP and MySQL to support documentation of all network and system objects within your computing environment. It offers a Web interface that enables easy navigation through objects, instances and attributes, with XML and access controls.
Enhancements:
- This is the first significant release of DMO for nearly two years.
- It works with Linux and Windows (XAMPP), but should work well with any LAMP stack including PHP4.
- New features include much more graphical viewing, as well as mapping objects onto maps with drill-down to additional layers of maps following dependency trails, a new Flash viewer for browsing through objects, and the ability to create chains of objects based on any attribute type (where any other object can be an attribute of any other object).
Download (14.4MB)
Added: 2007-08-01 License: GPL (GNU General Public License) Price:
814 downloads
HTML::Tree::AboutObjects 3.23
HTML::Tree::AboutObjects is an article: Users View of Object-Oriented Modules. more>>
HTML::Tree::AboutObjects is an article: "Users View of Object-Oriented Modules".
SYNOPSIS
# This an article, not a module.
The following article by Sean M. Burke first appeared in The Perl Journal #17 and is copyright 2000 The Perl Journal. It appears courtesy of Jon Orwant and The Perl Journal. This document may be distributed under the same terms as Perl itself.
<<lessSYNOPSIS
# This an article, not a module.
The following article by Sean M. Burke first appeared in The Perl Journal #17 and is copyright 2000 The Perl Journal. It appears courtesy of Jon Orwant and The Perl Journal. This document may be distributed under the same terms as Perl itself.
Download (0.11MB)
Added: 2007-08-15 License: Perl Artistic License Price:
800 downloads
OPEN BEXI HTML Builder 1.6
OPEN BEXI HTML Builder is a WYSIWYG HTML editor. more>>
OPEN BEXI HTML Builder is a WYSIWYG HTML editor which allows you to create Web pages and generate HTML code from your browser without any HTML knowledge.
It lets you create, update, and remove HTML components. OPEN BEXI HTML Builder is suitable for beginners and experts.
<<lessIt lets you create, update, and remove HTML components. OPEN BEXI HTML Builder is suitable for beginners and experts.
Download (1.8MB)
Added: 2007-04-05 License: GPL (GNU General Public License) Price:
939 downloads
Rose::Object::MakeMethods::Generic 0.84
Rose::Object::MakeMethods::Generic is a Perl module that can create simple object methods. more>>
Rose::Object::MakeMethods::Generic is a Perl module that can create simple object methods.
SYNOPSIS
package MyObject;
use Rose::Object::MakeMethods::Generic
(
scalar =>
[
power,
error,
],
scalar --get_set_init => name,
boolean --get_set_init => is_tall,
boolean =>
[
is_red,
is_happy => { default => 1 },
],
array =>
[
jobs => {},
job => { interface => get_set_item, hash_key => jobs },
clear_jobs => { interface => clear, hash_key => jobs },
reset_jobs => { interface => reset, hash_key => jobs },
],
hash =>
[
param => { hash_key => params },
params => { interface => get_set_all },
param_names => { interface => keys, hash_key => params },
param_values => { interface => values, hash_key => params },
param_exists => { interface => exists, hash_key => params },
delete_param => { interface => delete, hash_key => params },
clear_params => { interface => clear, hash_key => params },
reset_params => { interface => reset, hash_key => params },
],
);
sub init_name { Fred }
sub init_is_tall { 1 }
...
$obj = MyObject->new(power => 5);
print $obj->name; # Fred
$obj->do_something or die $obj->error;
$obj->is_tall; # true
$obj->is_tall(undef); # false (but defined)
$obj->is_tall; # false (but defined)
$obj->is_red; # undef
$obj->is_red(1234); # true
$obj->is_red(); # false (but defined)
$obj->is_red; # false (but defined)
$obj->is_happy; # true
$obj->params(a => 1, b => 2); # add pairs
$val = $obj->param(b); # 2
$obj->param_exists(x); # false
$obj->jobs(butcher, baker); # add values
$obj->job(0 => sailor); # set value
$job = $obj->job(0); # sailor
<<lessSYNOPSIS
package MyObject;
use Rose::Object::MakeMethods::Generic
(
scalar =>
[
power,
error,
],
scalar --get_set_init => name,
boolean --get_set_init => is_tall,
boolean =>
[
is_red,
is_happy => { default => 1 },
],
array =>
[
jobs => {},
job => { interface => get_set_item, hash_key => jobs },
clear_jobs => { interface => clear, hash_key => jobs },
reset_jobs => { interface => reset, hash_key => jobs },
],
hash =>
[
param => { hash_key => params },
params => { interface => get_set_all },
param_names => { interface => keys, hash_key => params },
param_values => { interface => values, hash_key => params },
param_exists => { interface => exists, hash_key => params },
delete_param => { interface => delete, hash_key => params },
clear_params => { interface => clear, hash_key => params },
reset_params => { interface => reset, hash_key => params },
],
);
sub init_name { Fred }
sub init_is_tall { 1 }
...
$obj = MyObject->new(power => 5);
print $obj->name; # Fred
$obj->do_something or die $obj->error;
$obj->is_tall; # true
$obj->is_tall(undef); # false (but defined)
$obj->is_tall; # false (but defined)
$obj->is_red; # undef
$obj->is_red(1234); # true
$obj->is_red(); # false (but defined)
$obj->is_red; # false (but defined)
$obj->is_happy; # true
$obj->params(a => 1, b => 2); # add pairs
$val = $obj->param(b); # 2
$obj->param_exists(x); # false
$obj->jobs(butcher, baker); # add values
$obj->job(0 => sailor); # set value
$job = $obj->job(0); # sailor
Download (0.028MB)
Added: 2007-08-17 License: Perl Artistic License Price:
798 downloads
CyberNeko HTML Parser 0.9.5
NekoHTML is a simple HTML scanner and tag balancer that enables application programmers to parse HTML documents. more>>
NekoHTML is a simple HTML scanner and tag balancer that enables application programmers to parse HTML documents and access the information using standard XML interfaces.
The parser can scan HTML files and "fix up" many common mistakes that human (and computer) authors make in writing HTML documents. NekoHTML adds missing parent elements; automatically closes elements with optional end tags; and can handle mismatched inline element tags.
NekoHTML is written using the Xerces Native Interface (XNI) that is the foundation of the Xerces2 implementation. This enables you to use the NekoHTML parser with existing XNI tools without modification or rewriting code.
Version restrictions:
- There are HTML documents for which NekoHTML cannot properly generate a well-formed XML document event stream. For example, documents with multiple tags are inherently ill-formed because XML documents may only have a single root element.
- Code added to the core DOM implementation in Xerces-J 2.0.1 introduced a bug in the HTML DOM implementation based on it.
The bug causes the element nodes in the resultant HTML document object to be of type org.apache.xerces.dom.ElementNSImpl instead of the appropriate HTML DOM element objects.
The problem affects NekoHTML users who use the parser with Xerces-J 2.0.1 and anyone using the HTML DOM implementation in Xerces-J 2.0.1.
- There are no other known major limitations with this release. However, additional work can always be done to improve performance, fix bugs, and add functionality.
<<lessThe parser can scan HTML files and "fix up" many common mistakes that human (and computer) authors make in writing HTML documents. NekoHTML adds missing parent elements; automatically closes elements with optional end tags; and can handle mismatched inline element tags.
NekoHTML is written using the Xerces Native Interface (XNI) that is the foundation of the Xerces2 implementation. This enables you to use the NekoHTML parser with existing XNI tools without modification or rewriting code.
Version restrictions:
- There are HTML documents for which NekoHTML cannot properly generate a well-formed XML document event stream. For example, documents with multiple tags are inherently ill-formed because XML documents may only have a single root element.
- Code added to the core DOM implementation in Xerces-J 2.0.1 introduced a bug in the HTML DOM implementation based on it.
The bug causes the element nodes in the resultant HTML document object to be of type org.apache.xerces.dom.ElementNSImpl instead of the appropriate HTML DOM element objects.
The problem affects NekoHTML users who use the parser with Xerces-J 2.0.1 and anyone using the HTML DOM implementation in Xerces-J 2.0.1.
- There are no other known major limitations with this release. However, additional work can always be done to improve performance, fix bugs, and add functionality.
Download (0.38MB)
Added: 2005-09-28 License: The Apache License Price:
1486 downloads
Rose::DB::Object::QueryBuilder 0.764
Rose::DB::Object::QueryBuilder is a Perl module that can build SQL queries on behalf of Rose::DB::Object::Manager. more>>
Rose::DB::Object::QueryBuilder is a Perl module that can build SQL queries on behalf of Rose::DB::Object::Manager.
SYNOPSIS
use Rose::DB::Object::QueryBuilder qw(build_select);
# Build simple query
$sql = build_select
(
dbh => $dbh,
select => COUNT(*),
tables => [ articles ],
columns => { articles => [ qw(id category type title date) ] },
query =>
[
category => [ sports, science ],
type => news,
title => { like => [ %million%,
%resident% ] },
],
query_is_sql => 1);
$sth = $dbh->prepare($sql);
$dbh->execute;
$count = $sth->fetchrow_array;
...
# Return query with placeholders, plus bind values
($sql, $bind) = build_select
(
dbh => $dbh,
tables => [ articles ],
columns => { articles => [ qw(id category type title date) ] },
query =>
[
category => [ sports, science ],
type => news,
title => { like => [ %million%,
%resident% ] },
],
query_is_sql => 1,
sort_by => title DESC, category,
limit => 5);
$sth = $dbh->prepare($sql);
$dbh->execute(@$bind);
while($row = $sth->fetchrow_hashref) { ... }
...
# Coerce query values into the right format
($sql, $bind) = build_select
(
db => $db,
tables => [ articles ],
columns => { articles => [ qw(id category type title date) ] },
classes => { articles => Article },
query =>
[
type => news,
date => { lt => now },
date => { gt => DateTime->new(...) },
],
sort_by => title DESC, category,
limit => 5);
$sth = $dbh->prepare($sql);
$dbh->execute(@$bind);
<<lessSYNOPSIS
use Rose::DB::Object::QueryBuilder qw(build_select);
# Build simple query
$sql = build_select
(
dbh => $dbh,
select => COUNT(*),
tables => [ articles ],
columns => { articles => [ qw(id category type title date) ] },
query =>
[
category => [ sports, science ],
type => news,
title => { like => [ %million%,
%resident% ] },
],
query_is_sql => 1);
$sth = $dbh->prepare($sql);
$dbh->execute;
$count = $sth->fetchrow_array;
...
# Return query with placeholders, plus bind values
($sql, $bind) = build_select
(
dbh => $dbh,
tables => [ articles ],
columns => { articles => [ qw(id category type title date) ] },
query =>
[
category => [ sports, science ],
type => news,
title => { like => [ %million%,
%resident% ] },
],
query_is_sql => 1,
sort_by => title DESC, category,
limit => 5);
$sth = $dbh->prepare($sql);
$dbh->execute(@$bind);
while($row = $sth->fetchrow_hashref) { ... }
...
# Coerce query values into the right format
($sql, $bind) = build_select
(
db => $db,
tables => [ articles ],
columns => { articles => [ qw(id category type title date) ] },
classes => { articles => Article },
query =>
[
type => news,
date => { lt => now },
date => { gt => DateTime->new(...) },
],
sort_by => title DESC, category,
limit => 5);
$sth = $dbh->prepare($sql);
$dbh->execute(@$bind);
Download (0.47MB)
Added: 2007-07-03 License: Perl Artistic License Price:
843 downloads
HTML::FromText 2.0.5
HTML::FromText is a Perl module that can convert plain text to HTML. more>>
HTML::FromText is a Perl module that can convert plain text to HTML.
SYNOPSIS
use HTML::FromText;
text2html( $text, %options );
# or
use HTML::FromText ();
my $t2h = HTML::FromText->new( %options );
my $html = $t2h->parse( $html );
HTML::FromText converts plain text to HTML. There are a handfull of options that shape the conversion. There is a utility function, text2html, thats exported by default. This function is simply a short- cut to the Object Oriented interface described in detail below.
<<lessSYNOPSIS
use HTML::FromText;
text2html( $text, %options );
# or
use HTML::FromText ();
my $t2h = HTML::FromText->new( %options );
my $html = $t2h->parse( $html );
HTML::FromText converts plain text to HTML. There are a handfull of options that shape the conversion. There is a utility function, text2html, thats exported by default. This function is simply a short- cut to the Object Oriented interface described in detail below.
Download (0.013MB)
Added: 2006-08-05 License: Perl Artistic License Price:
1175 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 rose html objects 0.547 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