tt
Sponsored Links
Sponsored Links
Secleted [ 0 ] software to compare
Results 1 - 15 of about 42
Template::Alloy::TT 1.005
Template::Alloy::TT Perl module contains a Template::Toolkit role. more>>
Template::Alloy::TT Perl module contains a Template::Toolkit role.
The Template::Alloy::TT role provides the syntax and the interface for Template::Toolkit version 1, 2, and 3. It also brings many of the features from the various templating systems.
And it is fast.
See the Template::Alloy documentation for configuration and other parameters.
<<lessThe Template::Alloy::TT role provides the syntax and the interface for Template::Toolkit version 1, 2, and 3. It also brings many of the features from the various templating systems.
And it is fast.
See the Template::Alloy documentation for configuration and other parameters.
Download (0.14MB)
Added: 2007-07-04 License: Perl Artistic License Price:
842 downloads
ExtUtils::ModuleMaker::TT 0.93
ExtUtils::ModuleMaker::TT is a Perl module that makes skeleton modules with Template Toolkit templates. more>>
ExtUtils::ModuleMaker::TT is a Perl module that makes skeleton modules with Template Toolkit templates.
SYNOPSIS
use ExtUtils::ModuleMaker;
my $mmtt = ExtUtils::ModuleMaker->new (
NAME => My::New::Module,
ALT_BUILD => ExtUtils::ModuleMaker::TT,
TEMPLATE_DIR => ~/.perltemplates,
);
$mmtt->complete_build();
Note: ExtUtils::ModuleMaker has changed substantially in recent releases and ExtUtils::ModuleMaker::TT has similarly changed substantially to be compatible with these changes. Please report any bugs you may find.
This module extends ExtUtils::ModuleMaker to use Template Toolkit 2 (TT2) to build skeleton files for a new module. Templates may either be default templates supplied within the module or user-customized templates in a directory specified with the TEMPLATE_DIR parameter.
Summary of Features/Enhancements:
- Supports building full module skeletons with all the functionality of ExtUtils::ModuleMaker
- Supports adding a single .pm file (and corresponding .t file) to an existing module distribution tree
- Supports creating skeleton text for a single method (generally to be called via a script from within your favorite editor)
- Creates a template directory containing the default templates for subsequent user customization
- Templates can access any parameter in the ExtUtils::ModuleMaker object (e.g. $mmtt, above). This supports transparent, user-extensible template variables for use in custom templates
- Included command-line program makeperlmod provides a command line user interface for module creation. Supports reading default configuration settings from a file and will create a default config file if requested. These config files extend and/or override an ExtUtils::ModuleMaker::Personal::Defaults file. The program can create full distributions, single modules, single methods, default configuration files or default template directories
Notable changes from ExtUtils::ModuleMaker:
- Default templates are generally simpler, as users are expected to customize their own
- .t files for single .pm files created after the original build are named after their corresponding .pm file rather than being sequentially numbered.
- In the command-line program, COMPACT style is set by default
<<lessSYNOPSIS
use ExtUtils::ModuleMaker;
my $mmtt = ExtUtils::ModuleMaker->new (
NAME => My::New::Module,
ALT_BUILD => ExtUtils::ModuleMaker::TT,
TEMPLATE_DIR => ~/.perltemplates,
);
$mmtt->complete_build();
Note: ExtUtils::ModuleMaker has changed substantially in recent releases and ExtUtils::ModuleMaker::TT has similarly changed substantially to be compatible with these changes. Please report any bugs you may find.
This module extends ExtUtils::ModuleMaker to use Template Toolkit 2 (TT2) to build skeleton files for a new module. Templates may either be default templates supplied within the module or user-customized templates in a directory specified with the TEMPLATE_DIR parameter.
Summary of Features/Enhancements:
- Supports building full module skeletons with all the functionality of ExtUtils::ModuleMaker
- Supports adding a single .pm file (and corresponding .t file) to an existing module distribution tree
- Supports creating skeleton text for a single method (generally to be called via a script from within your favorite editor)
- Creates a template directory containing the default templates for subsequent user customization
- Templates can access any parameter in the ExtUtils::ModuleMaker object (e.g. $mmtt, above). This supports transparent, user-extensible template variables for use in custom templates
- Included command-line program makeperlmod provides a command line user interface for module creation. Supports reading default configuration settings from a file and will create a default config file if requested. These config files extend and/or override an ExtUtils::ModuleMaker::Personal::Defaults file. The program can create full distributions, single modules, single methods, default configuration files or default template directories
Notable changes from ExtUtils::ModuleMaker:
- Default templates are generally simpler, as users are expected to customize their own
- .t files for single .pm files created after the original build are named after their corresponding .pm file rather than being sequentially numbered.
- In the command-line program, COMPACT style is set by default
Download (0.025MB)
Added: 2006-10-03 License: Perl Artistic License Price:
1118 downloads
Font::TTF::Glyph 0.40
Font::TTF::Glyph is a Perl module that holds a single glyphs information. more>>
Font::TTF::Glyph is a Perl module that holds a single glyphs information.
This is a single glyph description as held in a TT font. On creation only its header is read. Thus you can get the bounding box of each glyph without having to read all the other information.
INSTANCE VARIABLES
In addition to the named variables in a glyph header (xMin etc.), there are also all capital instance variables for holding working information, mostly from the location table.
The standard attributes each glyph has are:
numberOfContours
xMin
yMin
xMax
yMax
There are also other, derived, instance variables for each glyph which are read when the whole glyph is read (via read_dat):
instLen
Number of bytes in the hinting instructions (Warning this variable is deprecated, use length($g-{hints})> instead).
hints
The string containing the hinting code for the glyph
In addition there are other attribute like instance variables for simple glyphs:
For each contour there is:
endPoints
An array of endpoints for each contour in the glyph. There are numberOfContours contours in a glyph. The number of points in a glyph is equal to the highest endpoint of a contour.
There are also a number of arrays indexed by point number
flags
The flags associated with reading this point. The flags for a point are recalculated for a point when it is updated. Thus the flags are not very useful. The only important bit is bit 0 which indicates whether the point is an on curve point, or an off curve point.
x
The absolute x co-ordinate of the point.
y
The absolute y co-ordinate of the point
For composite glyphs there are other variables
metric
This holds the component number (not its glyph number) of the component from which the metrics for this glyph should be taken.
comps
This is an array of hashes for each component. Each hash has a number of elements:
glyph
The glyph number of the glyph which comprises this component of the composite.
args
An array of two arguments which may be an x, y co-ordinate or two attachment points (one on the base glyph the other on the component). See flags for details.
flag
The flag for this component
scale
A 4 number array for component scaling. This allows stretching, rotating, etc. Note that scaling applies to placement co-ordinates (rather than attachment points) before locating rather than after.
numPoints
This is a generated value which contains the number of components read in for this compound glyph.
The private instance variables are:
INFILE (P)
The input file form which to read any information
LOC (P)
Location relative to the start of the glyf table in the read file
BASE (P)
The location of the glyf table in the read file
LEN (P)
This is the number of bytes required by the glyph. It should be kept up to date by calling the update method whenever any of the glyph content changes.
OUTLOC (P)
Location relative to the start of the glyf table. This variable is only active whilst the output process is going on. It is used to inform the location table where the glyphs location is, since the glyf table is output before the loca table due to alphabetical ordering.
OUTLEN (P)
This indicates the length of the glyph data when it is output. This more accurately reflects the internal memory form than the LEN variable which only reflects the read file length. The OUTLEN variable is only set after calling out or out_dat.
<<lessThis is a single glyph description as held in a TT font. On creation only its header is read. Thus you can get the bounding box of each glyph without having to read all the other information.
INSTANCE VARIABLES
In addition to the named variables in a glyph header (xMin etc.), there are also all capital instance variables for holding working information, mostly from the location table.
The standard attributes each glyph has are:
numberOfContours
xMin
yMin
xMax
yMax
There are also other, derived, instance variables for each glyph which are read when the whole glyph is read (via read_dat):
instLen
Number of bytes in the hinting instructions (Warning this variable is deprecated, use length($g-{hints})> instead).
hints
The string containing the hinting code for the glyph
In addition there are other attribute like instance variables for simple glyphs:
For each contour there is:
endPoints
An array of endpoints for each contour in the glyph. There are numberOfContours contours in a glyph. The number of points in a glyph is equal to the highest endpoint of a contour.
There are also a number of arrays indexed by point number
flags
The flags associated with reading this point. The flags for a point are recalculated for a point when it is updated. Thus the flags are not very useful. The only important bit is bit 0 which indicates whether the point is an on curve point, or an off curve point.
x
The absolute x co-ordinate of the point.
y
The absolute y co-ordinate of the point
For composite glyphs there are other variables
metric
This holds the component number (not its glyph number) of the component from which the metrics for this glyph should be taken.
comps
This is an array of hashes for each component. Each hash has a number of elements:
glyph
The glyph number of the glyph which comprises this component of the composite.
args
An array of two arguments which may be an x, y co-ordinate or two attachment points (one on the base glyph the other on the component). See flags for details.
flag
The flag for this component
scale
A 4 number array for component scaling. This allows stretching, rotating, etc. Note that scaling applies to placement co-ordinates (rather than attachment points) before locating rather than after.
numPoints
This is a generated value which contains the number of components read in for this compound glyph.
The private instance variables are:
INFILE (P)
The input file form which to read any information
LOC (P)
Location relative to the start of the glyf table in the read file
BASE (P)
The location of the glyf table in the read file
LEN (P)
This is the number of bytes required by the glyph. It should be kept up to date by calling the update method whenever any of the glyph content changes.
OUTLOC (P)
Location relative to the start of the glyf table. This variable is only active whilst the output process is going on. It is used to inform the location table where the glyphs location is, since the glyf table is output before the loca table due to alphabetical ordering.
OUTLEN (P)
This indicates the length of the glyph data when it is output. This more accurately reflects the internal memory form than the LEN variable which only reflects the read file length. The OUTLEN variable is only set after calling out or out_dat.
Download (0.13MB)
Added: 2006-10-03 License: Perl Artistic License Price:
1117 downloads
Time::TT::InterpolatingRealisation 0.001
Time::TT::InterpolatingRealisation is a TT realised by interpolation. more>>
Time::TT::InterpolatingRealisation is a TT realised by interpolation.
SYNOPSIS
use Time::TT::InterpolatingRealisation;
$rln = Time::TT::InterpolatingRealisation->new($interpolator);
$tai_instant = $rln->to_tai($instant);
$instant = $rln->from_tai($tai_instant);
$rln1_instant = $rln0->to_realisation($rln1, $rln0_instant);
$rln0_instant = $rln0->from_realisation($rln1, $rln1_instant);
This class implements a realisation of Terrestrial Time (TT) by interpolation between known points of correlation between the realisation and International Atomic Time (TAI). See Time::TT::Realisation for the interface.
CONSTRUCTOR
Normally one wont use this constructor directly. See the tt_realisation function in Time::TT, which will construct a range of published realisations, most of which are implemented using this class. Use this directly only if the realisation that you desire is not available by that means.
Time::TT::InterpolatingRealisation->new(INTERPOLATOR)
Constructs and returns an object representing a realisation of TT that is defined by isolated points of correlation between it and TAI. The INTERPOLATOR argument must be an object of a subclass of Math::Interpolator, supplying the x and y methods. The x coordinate of the interpolators curve must represent TAI, and the y coordinate the realisation of interest. Times on both coordinates are represented as the number of seconds since the 1958 epoch, as described in Time::TT. All numbers must be Math::BigRat objects.
The class Time::TT::OffsetKnot may be useful in building the required interpolator.
<<lessSYNOPSIS
use Time::TT::InterpolatingRealisation;
$rln = Time::TT::InterpolatingRealisation->new($interpolator);
$tai_instant = $rln->to_tai($instant);
$instant = $rln->from_tai($tai_instant);
$rln1_instant = $rln0->to_realisation($rln1, $rln0_instant);
$rln0_instant = $rln0->from_realisation($rln1, $rln1_instant);
This class implements a realisation of Terrestrial Time (TT) by interpolation between known points of correlation between the realisation and International Atomic Time (TAI). See Time::TT::Realisation for the interface.
CONSTRUCTOR
Normally one wont use this constructor directly. See the tt_realisation function in Time::TT, which will construct a range of published realisations, most of which are implemented using this class. Use this directly only if the realisation that you desire is not available by that means.
Time::TT::InterpolatingRealisation->new(INTERPOLATOR)
Constructs and returns an object representing a realisation of TT that is defined by isolated points of correlation between it and TAI. The INTERPOLATOR argument must be an object of a subclass of Math::Interpolator, supplying the x and y methods. The x coordinate of the interpolators curve must represent TAI, and the y coordinate the realisation of interest. Times on both coordinates are represented as the number of seconds since the 1958 epoch, as described in Time::TT. All numbers must be Math::BigRat objects.
The class Time::TT::OffsetKnot may be useful in building the required interpolator.
Download (0.011MB)
Added: 2006-10-19 License: Perl Artistic License Price:
1100 downloads
OpenInteract2::TT2::Plugin 1.99_06
OpenInteract2::TT2::Plugin is a Perl module for custom OpenInteract functionality in templates. more>>
OpenInteract2::TT2::Plugin is a Perl module for custom OpenInteract functionality in templates.
SYNOPSIS
# Create the TT object with the OI plugin
my $template = Template->new(
PLUGINS => { OI => OpenInteract2::TT2::Plugin }, ... );
my ( $output );
$template->process( package::template, %params, $output );
# In the template (brief examples, see below for more)
Here is what the plugin can do:
< ul>< li>[% OI.show_all_actions.join( "n < li>" ) -%]< /ul>
Here are plugins available to you:
[% OI.show_all_plugins.keys.sort.join( , ) %]
Here are all the parameters passed to the request:
[% OI.request_param.sort.join( , ) %]
And the value of a particular parameter:
last name: [% OI.request_param( last_name ) %]
[% OI.action_execute( error_display, error_msg = error_msg ) -%]
# Note that you can also use the MSG function
[% OI.msg( mypage.intro, OI.login.full_name ) %]
# Note that you can also use the LH variable
[% mh = OI.msg_handle %]
[% mh.maketext( mypage.intro, OI.login.full_name ) %]
[% mh.maketext( mypage.learnmore ) %]
[% OI.box_add( contact_tools_box, title = Contact Tools,
weight = 2 ) -%]
[% object_info = OI.object_description( object ) %]
This is a [% object_info.name %] object.
Is the object in the class?
[% OI.class_isa( object, SPOPS::DBI ) ? yes : no %]
Is the SPOPS object writable?
[% IF OI.can_write( object ) %]Youre special![% END %]
[% action = OI.action %]
Action that called this template: [% action.name %]
Security for action:
[% action.security_level %] found,
[% action.security_required %] required
Properties of action:
[% action_prop = action.properties %]
[% FOREACH key = action_prop.keys %]
[% key %] = [% action_prop.$key %]
[% END %]
Parameters of action:
[% action_param = action.param %]
[% FOREACH key = action_param.keys %]
[% key %] = [% action_param.$key %]
[% END %]
Today is [% OI.date_format( now, %Y-%m-%d %l:%M %p ) %] the
[% OI.date_format( now, %j ) %] day of the year
[% d = OI.date_into_object( object.updated_on, %Y-%m-%d ) -%]
[% OI.action_execute( date_select, month_value = d.month,
day_value = d.day,
year_value = d.year, blank = 1,
field_prefix = updated_on ) -%]
[% INCLUDE form_checkbox( name = is_in_print,
value = TRUE,
is_checked = OI.as_boolean( book.is_in_print ) ) -%]
Is in print? [% OI.as_boolean_label( book.is_in_print ) %]
Is in print? [% OI.as_boolean_label( book.is_in_print, You betcha, No way ) %]
[% OI.limit_string( object.description, 30 ) %]
var person_last_name = [% OI.javascript_quote( person.last_name ) %];
[% OI.limit_sentences( news.news_item, 3 ) %]
[% score = grade.score / test.total %]
Your grade is: [% OI.percent_format( score ) %]
You have [% OI.money_format( account.balance ) %] left to spend.
Hello [% OI.uc_first( person.first_name ) %]
You are important so I must speak to you loudly [% OI.uc( person.last_name ) %]
Item: [% OI.html_decode( news.news_item ) %]
# Add parameters to an existing URL
[% display_no_template_url = OI.add_params_to_url( my_path, no_template = yes ) %]
# Works, but not as useful...
[% edit_url = OI.make_url( BASE = /User/show/, user_id = OI.login.user_id,
edit = 1, show_all = yes ) %]
# Preferred way to generate URLs for actions
[% edit_url = OI.make_url( ACTION = user, TASK = show,
user_id = OI.login.user_id,
edit = 1, show_all = yes ) %]
[% image_url = OI.make_url( IMAGE = /images/foo.gif ) %]
[% static_url = OI.make_url( STATIC = /generated/report-q1-2003.pdf ) %]
[% theme = OI.theme_properties %]
Background color of page: [% theme.bgcolor %]
[% new_theme = OI.theme_fetch( 5 ) %]
Background color of page from other theme: [% new_theme.bgcolor %]
[% IF OI.logged_in -%]
Hello [% OI.login.full_name %].
Your groups are: [% OI.login_group.join( , ) -%]
[% ELSE -%]
You are not logged in.
[% END -%]
Your last search: [% OI.session.latest_search %]
< a href="[% OI.return_url %]">Refresh< /a>
[% IF object.tmp_security_level >= OI.security_level.write -%]
you can edit this object!
[% END %]
<<lessSYNOPSIS
# Create the TT object with the OI plugin
my $template = Template->new(
PLUGINS => { OI => OpenInteract2::TT2::Plugin }, ... );
my ( $output );
$template->process( package::template, %params, $output );
# In the template (brief examples, see below for more)
Here is what the plugin can do:
< ul>< li>[% OI.show_all_actions.join( "n < li>" ) -%]< /ul>
Here are plugins available to you:
[% OI.show_all_plugins.keys.sort.join( , ) %]
Here are all the parameters passed to the request:
[% OI.request_param.sort.join( , ) %]
And the value of a particular parameter:
last name: [% OI.request_param( last_name ) %]
[% OI.action_execute( error_display, error_msg = error_msg ) -%]
# Note that you can also use the MSG function
[% OI.msg( mypage.intro, OI.login.full_name ) %]
# Note that you can also use the LH variable
[% mh = OI.msg_handle %]
[% mh.maketext( mypage.intro, OI.login.full_name ) %]
[% mh.maketext( mypage.learnmore ) %]
[% OI.box_add( contact_tools_box, title = Contact Tools,
weight = 2 ) -%]
[% object_info = OI.object_description( object ) %]
This is a [% object_info.name %] object.
Is the object in the class?
[% OI.class_isa( object, SPOPS::DBI ) ? yes : no %]
Is the SPOPS object writable?
[% IF OI.can_write( object ) %]Youre special![% END %]
[% action = OI.action %]
Action that called this template: [% action.name %]
Security for action:
[% action.security_level %] found,
[% action.security_required %] required
Properties of action:
[% action_prop = action.properties %]
[% FOREACH key = action_prop.keys %]
[% key %] = [% action_prop.$key %]
[% END %]
Parameters of action:
[% action_param = action.param %]
[% FOREACH key = action_param.keys %]
[% key %] = [% action_param.$key %]
[% END %]
Today is [% OI.date_format( now, %Y-%m-%d %l:%M %p ) %] the
[% OI.date_format( now, %j ) %] day of the year
[% d = OI.date_into_object( object.updated_on, %Y-%m-%d ) -%]
[% OI.action_execute( date_select, month_value = d.month,
day_value = d.day,
year_value = d.year, blank = 1,
field_prefix = updated_on ) -%]
[% INCLUDE form_checkbox( name = is_in_print,
value = TRUE,
is_checked = OI.as_boolean( book.is_in_print ) ) -%]
Is in print? [% OI.as_boolean_label( book.is_in_print ) %]
Is in print? [% OI.as_boolean_label( book.is_in_print, You betcha, No way ) %]
[% OI.limit_string( object.description, 30 ) %]
var person_last_name = [% OI.javascript_quote( person.last_name ) %];
[% OI.limit_sentences( news.news_item, 3 ) %]
[% score = grade.score / test.total %]
Your grade is: [% OI.percent_format( score ) %]
You have [% OI.money_format( account.balance ) %] left to spend.
Hello [% OI.uc_first( person.first_name ) %]
You are important so I must speak to you loudly [% OI.uc( person.last_name ) %]
Item: [% OI.html_decode( news.news_item ) %]
# Add parameters to an existing URL
[% display_no_template_url = OI.add_params_to_url( my_path, no_template = yes ) %]
# Works, but not as useful...
[% edit_url = OI.make_url( BASE = /User/show/, user_id = OI.login.user_id,
edit = 1, show_all = yes ) %]
# Preferred way to generate URLs for actions
[% edit_url = OI.make_url( ACTION = user, TASK = show,
user_id = OI.login.user_id,
edit = 1, show_all = yes ) %]
[% image_url = OI.make_url( IMAGE = /images/foo.gif ) %]
[% static_url = OI.make_url( STATIC = /generated/report-q1-2003.pdf ) %]
[% theme = OI.theme_properties %]
Background color of page: [% theme.bgcolor %]
[% new_theme = OI.theme_fetch( 5 ) %]
Background color of page from other theme: [% new_theme.bgcolor %]
[% IF OI.logged_in -%]
Hello [% OI.login.full_name %].
Your groups are: [% OI.login_group.join( , ) -%]
[% ELSE -%]
You are not logged in.
[% END -%]
Your last search: [% OI.session.latest_search %]
< a href="[% OI.return_url %]">Refresh< /a>
[% IF object.tmp_security_level >= OI.security_level.write -%]
you can edit this object!
[% END %]
Download (0.91MB)
Added: 2006-12-14 License: Perl Artistic License Price:
1044 downloads
Wiki::Toolkit::Formatter::Mediawiki 0.02
Wiki::Toolkit::Formatter::Mediawiki is a Mediawiki-style formatter for Wiki::Toolkit. more>>
Wiki::Toolkit::Formatter::Mediawiki is a Mediawiki-style formatter for Wiki::Toolkit.
SYNOPSIS
This package implements a formatter for the Wiki::Toolkit module which attempts to duplicate the behavior of the Mediawiki application (a set of PHP scripts used by Wikipedia and friends).
use Wiki::Toolkit
use Wiki::Toolkit::Store::Mediawiki;
use Wiki::Toolkit::Formatter::Mediawiki;
my $store = Wiki::Toolkit::Store::Mediawiki->new ( ... );
# See below for parameter details.
my $formatter = Wiki::Toolkit::Formatter::Mediawiki->new (%config,
store => $store);
my $wiki = Wiki::Toolkit->new (store => $store,
formatter => $formatter);
METHODS
new
my $store = Wiki::Toolkit::Store::Mediawiki->new ( ... );
my $formatter = Wiki::Toolkit::Formatter::Mediawiki->new
(allowed_tags => [# HTML
qw(b big blockquote br caption center cite code dd
div dl dt em font h1 h2 h3 h4 h5 h6 hr i li ol p
pre rb rp rt ruby s small strike strong sub sup
table td th tr tt u ul var),
# MediaWiki Specific
qw(nowiki),],
allowed_attrs => [qw(title align lang dir width height bgcolor),
qw(clear), # BR
qw(noshade), # HR
qw(cite), # BLOCKQUOTE, Q
qw(size face color), # FONT
# For various lists, mostly deprecated but
# safe
qw(type start value compact),
# Tables
qw(summary width border frame rules
cellspacing cellpadding valign char
charoff colgroup col span abbr axis
headers scope rowspan colspan),
qw(id class name style), # For CSS
],
node_prefix => ,
store => $store);
Parameters will default to the values above, with the exception of store, which is a required argument without a default. store does not have to be of type Wiki::Toolkit::Store::Mediawiki.
format
my $html = $formatter->format ($content);
Escapes any tags which werent specified as allowed on creation, then interpolates any macros, then calls Text::WikiFormat::format (with the specialized Mediawiki config) to translate the raw Wiki language supplied into HTML.
find_internal_links
my @links_to = $formatter->find_internal_links ($content);
Returns a list of all nodes that the supplied content links to.
<<lessSYNOPSIS
This package implements a formatter for the Wiki::Toolkit module which attempts to duplicate the behavior of the Mediawiki application (a set of PHP scripts used by Wikipedia and friends).
use Wiki::Toolkit
use Wiki::Toolkit::Store::Mediawiki;
use Wiki::Toolkit::Formatter::Mediawiki;
my $store = Wiki::Toolkit::Store::Mediawiki->new ( ... );
# See below for parameter details.
my $formatter = Wiki::Toolkit::Formatter::Mediawiki->new (%config,
store => $store);
my $wiki = Wiki::Toolkit->new (store => $store,
formatter => $formatter);
METHODS
new
my $store = Wiki::Toolkit::Store::Mediawiki->new ( ... );
my $formatter = Wiki::Toolkit::Formatter::Mediawiki->new
(allowed_tags => [# HTML
qw(b big blockquote br caption center cite code dd
div dl dt em font h1 h2 h3 h4 h5 h6 hr i li ol p
pre rb rp rt ruby s small strike strong sub sup
table td th tr tt u ul var),
# MediaWiki Specific
qw(nowiki),],
allowed_attrs => [qw(title align lang dir width height bgcolor),
qw(clear), # BR
qw(noshade), # HR
qw(cite), # BLOCKQUOTE, Q
qw(size face color), # FONT
# For various lists, mostly deprecated but
# safe
qw(type start value compact),
# Tables
qw(summary width border frame rules
cellspacing cellpadding valign char
charoff colgroup col span abbr axis
headers scope rowspan colspan),
qw(id class name style), # For CSS
],
node_prefix => ,
store => $store);
Parameters will default to the values above, with the exception of store, which is a required argument without a default. store does not have to be of type Wiki::Toolkit::Store::Mediawiki.
format
my $html = $formatter->format ($content);
Escapes any tags which werent specified as allowed on creation, then interpolates any macros, then calls Text::WikiFormat::format (with the specialized Mediawiki config) to translate the raw Wiki language supplied into HTML.
find_internal_links
my @links_to = $formatter->find_internal_links ($content);
Returns a list of all nodes that the supplied content links to.
Download (0.006MB)
Added: 2007-04-02 License: Perl Artistic License Price:
936 downloads
Catalyst 5.7007
Catalyst is a Perl module that contains the elegant MVC web application framework. more>>
Catalyst is a Perl module that contains the elegant MVC web application framework.
SYNOPSIS
See the Catalyst::Manual distribution for comprehensive documentation and tutorials.
# Install Catalyst::Devel for helpers and other development tools
# use the helper to create a new application
catalyst.pl MyApp
# add models, views, controllers
script/myapp_create.pl model MyDatabase DBIC::Schema create=dynamic dbi:SQLite:/path/to/db
script/myapp_create.pl view MyTemplate TT
script/myapp_create.pl controller Search
# built in testserver -- use -r to restart automatically on changes
# --help to see all available options
script/myapp_server.pl
# command line testing interface
script/myapp_test.pl /yada
### in lib/MyApp.pm
use Catalyst qw/-Debug/; # include plugins here as well
### In lib/MyApp/Controller/Root.pm (autocreated)
sub foo : Global { # called for /foo, /foo/1, /foo/1/2, etc.
my ( $self, $c, @args ) = @_; # args are qw/1 2/ for /foo/1/2
$c->stash->{template} = foo.tt; # set the template
# lookup something from db -- stash vars are passed to TT
$c->stash->{data} =
$c->model(Database::Foo)->search( { country => $args[0] } );
if ( $c->req->params->{bar} ) { # access GET or POST parameters
$c->forward( bar ); # process another action
# do something else after forward returns
}
}
# The foo.tt TT template can use the stash data from the database
[% WHILE (item = data.next) %]
[% item.foo %]
[% END %]
# called for /bar/of/soap, /bar/of/soap/10, etc.
sub bar : Path(/bar/of/soap) { ... }
# called for all actions, from the top-most controller downwards
sub auto : Private {
my ( $self, $c ) = @_;
if ( !$c->user_exists ) { # Catalyst::Plugin::Authentication
$c->res->redirect( /login ); # require login
return 0; # abort request and go immediately to end()
}
return 1; # success; carry on to next action
}
# called after all actions are finished
sub end : Private {
my ( $self, $c ) = @_;
if ( scalar @{ $c->error } ) { ... } # handle errors
return if $c->res->body; # already have a response
$c->forward( MyApp::View::TT ); # render template
}
### in MyApp/Controller/Foo.pm
# called for /foo/bar
sub bar : Local { ... }
# called for /blargle
sub blargle : Global { ... }
# an index action matches /foo, but not /foo/1, etc.
sub index : Private { ... }
### in MyApp/Controller/Foo/Bar.pm
# called for /foo/bar/baz
sub baz : Local { ... }
# first Root auto is called, then Foo auto, then this
sub auto : Private { ... }
# powerful regular expression paths are also possible
sub details : Regex(^product/(w+)/details$) {
my ( $self, $c ) = @_;
# extract the (w+) from the URI
my $product = $c->req->captures->[0];
}
<<lessSYNOPSIS
See the Catalyst::Manual distribution for comprehensive documentation and tutorials.
# Install Catalyst::Devel for helpers and other development tools
# use the helper to create a new application
catalyst.pl MyApp
# add models, views, controllers
script/myapp_create.pl model MyDatabase DBIC::Schema create=dynamic dbi:SQLite:/path/to/db
script/myapp_create.pl view MyTemplate TT
script/myapp_create.pl controller Search
# built in testserver -- use -r to restart automatically on changes
# --help to see all available options
script/myapp_server.pl
# command line testing interface
script/myapp_test.pl /yada
### in lib/MyApp.pm
use Catalyst qw/-Debug/; # include plugins here as well
### In lib/MyApp/Controller/Root.pm (autocreated)
sub foo : Global { # called for /foo, /foo/1, /foo/1/2, etc.
my ( $self, $c, @args ) = @_; # args are qw/1 2/ for /foo/1/2
$c->stash->{template} = foo.tt; # set the template
# lookup something from db -- stash vars are passed to TT
$c->stash->{data} =
$c->model(Database::Foo)->search( { country => $args[0] } );
if ( $c->req->params->{bar} ) { # access GET or POST parameters
$c->forward( bar ); # process another action
# do something else after forward returns
}
}
# The foo.tt TT template can use the stash data from the database
[% WHILE (item = data.next) %]
[% item.foo %]
[% END %]
# called for /bar/of/soap, /bar/of/soap/10, etc.
sub bar : Path(/bar/of/soap) { ... }
# called for all actions, from the top-most controller downwards
sub auto : Private {
my ( $self, $c ) = @_;
if ( !$c->user_exists ) { # Catalyst::Plugin::Authentication
$c->res->redirect( /login ); # require login
return 0; # abort request and go immediately to end()
}
return 1; # success; carry on to next action
}
# called after all actions are finished
sub end : Private {
my ( $self, $c ) = @_;
if ( scalar @{ $c->error } ) { ... } # handle errors
return if $c->res->body; # already have a response
$c->forward( MyApp::View::TT ); # render template
}
### in MyApp/Controller/Foo.pm
# called for /foo/bar
sub bar : Local { ... }
# called for /blargle
sub blargle : Global { ... }
# an index action matches /foo, but not /foo/1, etc.
sub index : Private { ... }
### in MyApp/Controller/Foo/Bar.pm
# called for /foo/bar/baz
sub baz : Local { ... }
# first Root auto is called, then Foo auto, then this
sub auto : Private { ... }
# powerful regular expression paths are also possible
sub details : Regex(^product/(w+)/details$) {
my ( $self, $c ) = @_;
# extract the (w+) from the URI
my $product = $c->req->captures->[0];
}
Download (0.14MB)
Added: 2007-05-09 License: Perl Artistic License Price:
898 downloads
Template::FAQ 2.19
Template::FAQ contains Frequently Asked Questions about the Template Toolkit. more>>
Template::FAQ contains Frequently Asked Questions about the Template Toolkit.
Template Toolkit Language
Why doesnt [% a = b IF c %] work as expected?
Because the parser interprets it as
[% a = (b IF c) %]
Do this instead:
[% SET a = b IF c %]
If Im using TT to write out a TT template, is there a good way to escape [% and %]?
You can do this:
[% stag = "[%"
etag = "%]"
%]
and then:
[% stag; hello; etag %]
Or something like:
[% TAGS [- -] %]
[- INCLUDE foo -] # is a directive
[% INCLUDE foo %] # not a directive, just plain text, passed through
How do I iterate over a hash?
This is covered in the Template::Manual::VMethods section of the manual page. A list of all the keys that are in the hash can be obtained with the keys virtual method. You can then iterate over that list and by looking up each key in turn get the value.
[% FOREACH key = product.keys %]
[% key %] => [% product.$key %]
[% END %]
<<lessTemplate Toolkit Language
Why doesnt [% a = b IF c %] work as expected?
Because the parser interprets it as
[% a = (b IF c) %]
Do this instead:
[% SET a = b IF c %]
If Im using TT to write out a TT template, is there a good way to escape [% and %]?
You can do this:
[% stag = "[%"
etag = "%]"
%]
and then:
[% stag; hello; etag %]
Or something like:
[% TAGS [- -] %]
[- INCLUDE foo -] # is a directive
[% INCLUDE foo %] # not a directive, just plain text, passed through
How do I iterate over a hash?
This is covered in the Template::Manual::VMethods section of the manual page. A list of all the keys that are in the hash can be obtained with the keys virtual method. You can then iterate over that list and by looking up each key in turn get the value.
[% FOREACH key = product.keys %]
[% key %] => [% product.$key %]
[% END %]
Download (0.76MB)
Added: 2007-08-16 License: Perl Artistic License Price:
801 downloads
Tiny Tiny RSS 1.2.13
Tiny Tiny RSS is a server-side RSS feed aggregator written in PHP and heavily based on XmlHttpRequest and related technologies. more>>
Tiny Tiny RSS is a server-side RSS feed aggregator written in PHP and heavily based on XmlHttpRequest and related technologies for user interface and operation.
For years Ive been searching for a perfect RSS aggregator. I tried desktop ones (Straw, Blam!, Liferea) - while nice programs they usually lacked something or were overencumbered with features. Also, desktop aggregators cant solve the problem of keeping read feeds in sync between different machines.
I tried server-side aggregators, several ones. Unfortunately, I didnt find anything that felt usable, they had all the problems of classical web applications - clunky interface, no realtime updates, just not designed the way I like it, etc.
Well, then the obvious solution was to write an aggregator myself. I also felt the need to exercise in simple XmlHttpRequest web application programming, so TT-RSS was born. While obviously being on early stages on development and pretty much unfinished it offers a lot of functionality of desktop application while staying on server-side with all the benefits it provides.
<<lessFor years Ive been searching for a perfect RSS aggregator. I tried desktop ones (Straw, Blam!, Liferea) - while nice programs they usually lacked something or were overencumbered with features. Also, desktop aggregators cant solve the problem of keeping read feeds in sync between different machines.
I tried server-side aggregators, several ones. Unfortunately, I didnt find anything that felt usable, they had all the problems of classical web applications - clunky interface, no realtime updates, just not designed the way I like it, etc.
Well, then the obvious solution was to write an aggregator myself. I also felt the need to exercise in simple XmlHttpRequest web application programming, so TT-RSS was born. While obviously being on early stages on development and pretty much unfinished it offers a lot of functionality of desktop application while staying on server-side with all the benefits it provides.
Download (0.35MB)
Added: 2007-07-20 License: GPL (GNU General Public License) Price:
827 downloads
Template::Alloy 1.004
Template::Alloy is a TT2/3, HT, HTE, Tmpl, and Velocity Engine. more>>
Template::Alloy is a TT2/3, HT, HTE, Tmpl, and Velocity Engine.
SYNOPSIS
Template::Toolkit style usage
my $t = Template::Alloy->new(
INCLUDE_PATH => [/path/to/templates],
);
my $swap = {
key1 => val1,
key2 => val2,
code => sub { 42 },
hash => {a => b},
};
# print to STDOUT
$t->process(my/template.tt, $swap)
|| die $t->error;
# process into a variable
my $out = ;
$t->process(my/template.tt, $swap, $out);
### Alloy uses the same syntax and configuration as Template::Toolkit
HTML::Template::Expr style usage
my $t = Template::Alloy->new(
filename => my/template.ht,
path => [/path/to/templates],
);
my $swap = {
key1 => val1,
key2 => val2,
code => sub { 42 },
hash => {a => b},
};
$t->param($swap);
# print to STDOUT (errors die)
$t->output(print_to => *STDOUT);
# process into a variable
my $out = $t->output;
### Alloy can also use the same syntax and configuration as HTML::Template
Text::Tmpl style usage
my $t = Template::Alloy->new;
my $swap = {
key1 => val1,
key2 => val2,
code => sub { 42 },
hash => {a => b},
};
$t->set_delimiters(#[, ]#);
$t->set_strip(0);
$t->set_values($swap);
$t->set_dir(/path/to/templates);
my $out = $t->parse_file(my/template.tmpl);
my $str = "Foo #[echo $key1]# Bar";
my $out = $t->parse_string($str);
### Alloy uses the same syntax and configuration as Text::Tmpl
Velocity (VTL) style usage
my $t = Template::Alloy->new;
my $swap = {
key1 => val1,
key2 => val2,
code => sub { 42 },
hash => {a => b},
};
my $out = $t->merge(my/template.vtl, $swap);
my $str = "#set($foo 1 + 3) ($foo) ($bar) ($!baz)";
my $out = $t->merge($str, $swap);
<<lessSYNOPSIS
Template::Toolkit style usage
my $t = Template::Alloy->new(
INCLUDE_PATH => [/path/to/templates],
);
my $swap = {
key1 => val1,
key2 => val2,
code => sub { 42 },
hash => {a => b},
};
# print to STDOUT
$t->process(my/template.tt, $swap)
|| die $t->error;
# process into a variable
my $out = ;
$t->process(my/template.tt, $swap, $out);
### Alloy uses the same syntax and configuration as Template::Toolkit
HTML::Template::Expr style usage
my $t = Template::Alloy->new(
filename => my/template.ht,
path => [/path/to/templates],
);
my $swap = {
key1 => val1,
key2 => val2,
code => sub { 42 },
hash => {a => b},
};
$t->param($swap);
# print to STDOUT (errors die)
$t->output(print_to => *STDOUT);
# process into a variable
my $out = $t->output;
### Alloy can also use the same syntax and configuration as HTML::Template
Text::Tmpl style usage
my $t = Template::Alloy->new;
my $swap = {
key1 => val1,
key2 => val2,
code => sub { 42 },
hash => {a => b},
};
$t->set_delimiters(#[, ]#);
$t->set_strip(0);
$t->set_values($swap);
$t->set_dir(/path/to/templates);
my $out = $t->parse_file(my/template.tmpl);
my $str = "Foo #[echo $key1]# Bar";
my $out = $t->parse_string($str);
### Alloy uses the same syntax and configuration as Text::Tmpl
Velocity (VTL) style usage
my $t = Template::Alloy->new;
my $swap = {
key1 => val1,
key2 => val2,
code => sub { 42 },
hash => {a => b},
};
my $out = $t->merge(my/template.vtl, $swap);
my $str = "#set($foo 1 + 3) ($foo) ($bar) ($!baz)";
my $out = $t->merge($str, $swap);
Download (0.14MB)
Added: 2007-06-28 License: Perl Artistic License Price:
849 downloads
Catalyst::Enzyme 0.11
Catalyst::Enzyme is a CRUD framework for Catalyst. more>>
Catalyst::Enzyme is a CRUD framework for Catalyst.
SYNOPSIS
#Create app
catalyst BookShelf
cd BookShelf
#Create View
scriptbookshelf_create.pl view TT Enzyme::TT
#Create database
... left as an exercise for the reader (actually, see the tutorial) ...
#Create Models for all tables
scriptbookshelf_create.pl model BookShelfDB Enzyme::CDBI dbi:SQLite:dbname=db/bookshelf.db
#Create Controller
scriptbookshelf_create.pl controller Book Enzyme::CRUD BookShelfDB::Book
Browse to http://localhost:3000/book and see what it looks like without any configuration.
See the "DEMO APPLICATION" below for a ready-to-run example of the BookDB.
See the "TUTORIAL" below for a detailed example of how to create an application from the BookDB schema.
Catalyst::Enzyme is a layer on top of the Catalyst framework providing CRUD functionality for Class::DBI models.
Enzyme uses convention and configuration to provide e.g. extensible CRUD out-of-the-box, and a common way of dealing with error handling etc.
Its not completely unlike Maypole in this regard. However, at this point Enzyme isnt as feature-rich as Maypole.
Enzyme is one way of bringing many Catalyst modules and concepts together into a unified whole. There are other ways to do this (obviously. This is, like... uh, Perl).
<<lessSYNOPSIS
#Create app
catalyst BookShelf
cd BookShelf
#Create View
scriptbookshelf_create.pl view TT Enzyme::TT
#Create database
... left as an exercise for the reader (actually, see the tutorial) ...
#Create Models for all tables
scriptbookshelf_create.pl model BookShelfDB Enzyme::CDBI dbi:SQLite:dbname=db/bookshelf.db
#Create Controller
scriptbookshelf_create.pl controller Book Enzyme::CRUD BookShelfDB::Book
Browse to http://localhost:3000/book and see what it looks like without any configuration.
See the "DEMO APPLICATION" below for a ready-to-run example of the BookDB.
See the "TUTORIAL" below for a detailed example of how to create an application from the BookDB schema.
Catalyst::Enzyme is a layer on top of the Catalyst framework providing CRUD functionality for Class::DBI models.
Enzyme uses convention and configuration to provide e.g. extensible CRUD out-of-the-box, and a common way of dealing with error handling etc.
Its not completely unlike Maypole in this regard. However, at this point Enzyme isnt as feature-rich as Maypole.
Enzyme is one way of bringing many Catalyst modules and concepts together into a unified whole. There are other ways to do this (obviously. This is, like... uh, Perl).
Download (0.070MB)
Added: 2006-10-20 License: Perl Artistic License Price:
1100 downloads
lhs2tex 1.9
lhs2tex is a preprocessor to generate LaTeX from literate Haskell sources. more>>
lhs2TeX is a preprocessor to generate LaTeX code from literate Haskell sources.
Main features:
- Different styles to process your source file: for instance, "tt" style uses a monospaced font for the code while still allowing you to highlight keywords etc, whereas "poly" style uses proportional fonts for identifiers, handles indentation nicely, is able to replace binary operators by mathematical symbols and take care of complex horizontal alignments.
- Formatting directives, which let you customize the way certain tokens in the source code should appear in the processed output.
- A liberal parser that can handle most of the language extensions; you dont have to restrict yourself to Haskell 98.
- Preprocessor-style conditionals that allow you to generate different versions of a document from a single source file (for instance, a paper and a presentation).
- Active documents: you can use Haskell to generate parts of the document (useful for papers on Haskell).
- A manual explaining all the important aspects of lhs2TeX.
<<lessMain features:
- Different styles to process your source file: for instance, "tt" style uses a monospaced font for the code while still allowing you to highlight keywords etc, whereas "poly" style uses proportional fonts for identifiers, handles indentation nicely, is able to replace binary operators by mathematical symbols and take care of complex horizontal alignments.
- Formatting directives, which let you customize the way certain tokens in the source code should appear in the processed output.
- A liberal parser that can handle most of the language extensions; you dont have to restrict yourself to Haskell 98.
- Preprocessor-style conditionals that allow you to generate different versions of a document from a single source file (for instance, a paper and a presentation).
- Active documents: you can use Haskell to generate parts of the document (useful for papers on Haskell).
- A manual explaining all the important aspects of lhs2TeX.
Download (0.51MB)
Added: 2005-04-13 License: GPL (GNU General Public License) Price:
1658 downloads
Gantry::Docs::About 3.41
Gantry::Docs::About is a document explaining Gantrys features and history. more>>
Gantry::Docs::About is a document explaining Gantrys features and history.
History
Along about 1997 or so, our company (a cable/ISP owned by a newspaper) began serving mod_perl apps to staff and customers. A framework developed and flourished. It was simple, explicit, and fast enough for the high-volume sites run by our parent newspaper. As time passed, improvements were made until a second version was conceived and deployed.
Finally, in August of 2005, a third revision was completed which is now available as an open source product (under the standard Perl license). The new version has lots of new features and removes some of the arcana that built up over the previous six or so years. Notably, it gained an MVC structure and some nifty automated CRUD. But the newly released third version, now called Gantry, retains simplicity, explicitness, speedy throughput, and the ability to host complex projects.
Main features:
- a central mod_perl handler all apps may inherit (Gantry.pm)
- CGI/FastCGI support (Gantry::Engine::CGI)
- automated CRUD (create, retrieve, update, delete) for straightforward tables (Gantry::Plugins::AutoCRUD)
- flexible CRUD for the sophisticated parts of applications (Gantry::Plugins::CRUD)
- easy date entry (via javascript code in form.tt)
<<lessHistory
Along about 1997 or so, our company (a cable/ISP owned by a newspaper) began serving mod_perl apps to staff and customers. A framework developed and flourished. It was simple, explicit, and fast enough for the high-volume sites run by our parent newspaper. As time passed, improvements were made until a second version was conceived and deployed.
Finally, in August of 2005, a third revision was completed which is now available as an open source product (under the standard Perl license). The new version has lots of new features and removes some of the arcana that built up over the previous six or so years. Notably, it gained an MVC structure and some nifty automated CRUD. But the newly released third version, now called Gantry, retains simplicity, explicitness, speedy throughput, and the ability to host complex projects.
Main features:
- a central mod_perl handler all apps may inherit (Gantry.pm)
- CGI/FastCGI support (Gantry::Engine::CGI)
- automated CRUD (create, retrieve, update, delete) for straightforward tables (Gantry::Plugins::AutoCRUD)
- flexible CRUD for the sophisticated parts of applications (Gantry::Plugins::CRUD)
- easy date entry (via javascript code in form.tt)
Download (0.19MB)
Added: 2006-10-20 License: Perl Artistic License Price:
1099 downloads
Hatari 0.95
Hatari is an Atari ST and STE emulator for Linux. more>>
Hatari is project an Atari ST and STE emulator for Linux, BSD, BeOS, Mac OS X and other systems that are supported by the SDL library. The Atari ST was a 16/32 bit computer system which was first released by Atari in 1985.
Using the Motorola 68000 CPU, it was a very popular computer having quite a lot of CPU power at that time. Unlike many other Atari ST emulators which try to give you a good environment for running GEM applications, Hatari tries to emulate the hardware of a ST as close as possible so that it is able to run most of the old ST games and demos.
Hatari is open source software and is distributed under the terms of the GNU General Public License (GPL).
Enhancements:
- This release brings you basic Atari TT and Falcon emulation! Please note that both new emulation modes are still highly experiemental, some few games and demos work, but most still have more or less big problems.
- Basic emulation of Falcon video shifter (Videl), NVRAM and DMA sound is in place. The biggest drawback: There is no working Falcon DSP emulation yet.
- Screen/Shifter emulation timings have slightly been changed. Some things now work better, some others work worse...
- Some patches for compiling on RiscOS and AmigaOS have been included.
- Compiling Hatari for Windows now works better.
- Added Hatari icon (hatari-icon.bmp).
- Fixed "movec" bug in 68020 CPU mode.
- Keyboard shortcuts for loading & saving memory snapshots (AltGr+k & AltGr+l).
- The built-in debugger has been slightly improved to be more user-friendly.
- Added "hmsa" tool a little program for converting .MSA files to .ST and vice versa.
<<lessUsing the Motorola 68000 CPU, it was a very popular computer having quite a lot of CPU power at that time. Unlike many other Atari ST emulators which try to give you a good environment for running GEM applications, Hatari tries to emulate the hardware of a ST as close as possible so that it is able to run most of the old ST games and demos.
Hatari is open source software and is distributed under the terms of the GNU General Public License (GPL).
Enhancements:
- This release brings you basic Atari TT and Falcon emulation! Please note that both new emulation modes are still highly experiemental, some few games and demos work, but most still have more or less big problems.
- Basic emulation of Falcon video shifter (Videl), NVRAM and DMA sound is in place. The biggest drawback: There is no working Falcon DSP emulation yet.
- Screen/Shifter emulation timings have slightly been changed. Some things now work better, some others work worse...
- Some patches for compiling on RiscOS and AmigaOS have been included.
- Compiling Hatari for Windows now works better.
- Added Hatari icon (hatari-icon.bmp).
- Fixed "movec" bug in 68020 CPU mode.
- Keyboard shortcuts for loading & saving memory snapshots (AltGr+k & AltGr+l).
- The built-in debugger has been slightly improved to be more user-friendly.
- Added "hmsa" tool a little program for converting .MSA files to .ST and vice versa.
Download (0.58MB)
Added: 2007-05-12 License: GPL (GNU General Public License) Price:
903 downloads
SVG::Template::Graph 0.11
SVG::Template::Graph is a Perl extension for generating template-driven graphs with SVG. more>>
SVG::Template::Graph is a Perl extension for generating template-driven graphs with SVG.
SYNOPSIS
use SVG::Template::Graph;
$data = [
{
barGraph=>1,#
barSpace=>20,
title=> 1: Trace 1,
data => #hash ref containing x-val and y-val array refs
{
x_val =>
[50,100,150,200,250,
300,350,400,450,500,550],
y_val =>
[100,150,100,126,100,
175,100,150,120,125,100],
},
format =>
{ #note that these values could change for *each* trace
lineGraph => 1,
x_min => 0,
x_max => 600,
y_min => 50,
y_max => 200,
x_axis => 1, #draw x-axis
y_axis => 1, #draw y-axis
#define the labels that provide the data context.
labels =>
{
#for year labels, we have to center the axis markers
x_ticks =>
{
label =>[2002,2003,2004],
position=>[100,300,500],
},
y_ticks =>
{
#tick mark labels
label => [ -250, 0, 250, 500],
#tick mark location in the data space
position => [50, 100, 150, 200],
},
},
},
},
];
#construct a new SVG::Template::Graph object with a file handle
my $tt = SVG::Template::Graph->new($file);
#set up the titles for the graph
$tt->setGraphTitle([Hello svg graphing world,I am a subtitle]);
#generate the traces.
$tt->drawTraces($data,$anchor_rectangle_id);
#serialize and print
print $tt->burn();
Template::Graph:SVG is a module for the generation of template-driven graphs using Scalable Vector Graphics (SVG). Using this module, it is possible to define a template SVG document with containers which are populated with correctly scaled plot images.
<<lessSYNOPSIS
use SVG::Template::Graph;
$data = [
{
barGraph=>1,#
barSpace=>20,
title=> 1: Trace 1,
data => #hash ref containing x-val and y-val array refs
{
x_val =>
[50,100,150,200,250,
300,350,400,450,500,550],
y_val =>
[100,150,100,126,100,
175,100,150,120,125,100],
},
format =>
{ #note that these values could change for *each* trace
lineGraph => 1,
x_min => 0,
x_max => 600,
y_min => 50,
y_max => 200,
x_axis => 1, #draw x-axis
y_axis => 1, #draw y-axis
#define the labels that provide the data context.
labels =>
{
#for year labels, we have to center the axis markers
x_ticks =>
{
label =>[2002,2003,2004],
position=>[100,300,500],
},
y_ticks =>
{
#tick mark labels
label => [ -250, 0, 250, 500],
#tick mark location in the data space
position => [50, 100, 150, 200],
},
},
},
},
];
#construct a new SVG::Template::Graph object with a file handle
my $tt = SVG::Template::Graph->new($file);
#set up the titles for the graph
$tt->setGraphTitle([Hello svg graphing world,I am a subtitle]);
#generate the traces.
$tt->drawTraces($data,$anchor_rectangle_id);
#serialize and print
print $tt->burn();
Template::Graph:SVG is a module for the generation of template-driven graphs using Scalable Vector Graphics (SVG). Using this module, it is possible to define a template SVG document with containers which are populated with correctly scaled plot images.
Added: 2007-04-23 License: Perl Artistic License Price:
915 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 tt 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