Main > Free Download Search >

Free simple software for linux

simple

Sponsored Links
Sponsored Links
Secleted [ 0 ] software to compare
Results 1 - 15 of about 5120
Sunergos Simple

Sunergos Simple


Sunergos Simple is a minimal Gnome Login Manager. more>>
Sunergos Simple is a minimal Gnome Login Manager.

An experiment in minimalism.

There are no options, no buttons, just a hello and how are you and why dont you just log in already?

So, this theme may not be suited for all users.

However, it is _extremely_ easy to understand and quite useful if you are interested in creating your own theme.

<<less
Download (0.13MB)
Added: 2006-09-27 License: GPL (GNU General Public License) Price:
1122 downloads
LJ::Simple 0.15

LJ::Simple 0.15


LJ::Simple is a Perl module to provide a simple OOP-based API for accessing the LiveJournal system. more>>
LJ::Simple is a Perl module to provide a simple OOP-based API for accessing the LiveJournal system.
Main features:
- Log into LiveJournal
- Post a journal entry
- Edit a journal entry
- Delete a journal entry
Example
The following example posts a simple message into the test LiveJournal using the LJ::Simple::QuickPost method.
use LJ::Simple;
LJ::Simple::QuickPost(
user => "test",
pass => "test",
entry => "Just a simple entry",
) || die "$0: Failed to post entry: $LJ::Simple::errorn";
The next example shows how to post an entry into the test LiveJournal using the complete, object-based, interface:
use LJ::Simple;
my $lj = new LJ::Simple ({
user => "test",
pass => "test",
});
(defined $lj)
|| die "$0: Failed to log into LiveJournal: $LJ::Simple::errorn";
my %Event=();
$lj->NewEntry(%Event) ||
die "$0: Failed to create new entry: $LJ::Simple::errorn";
my $entry=SetMood(%Event,"happy")
|| die "$0: Failed to set mood: $LJ::Simple::errorn";
$lj->Setprop_nocomments(%Event,1);
my ($item_id,$anum,$html_id)=$lj->PostEntry(%Event);
(defined $item_id)
|| die "$0: Failed to post journal entry: $LJ::Simple::errorn";
<<less
Download (0.043MB)
Added: 2006-02-27 License: BSD License Price:
1335 downloads
GD::Simple 2.35

GD::Simple 2.35


GD::Simple module is a simplified interface to GD library. more>>
GD::Simple module is a simplified interface to GD library.

SYNOPSIS

use GD::Simple;

# create a new image
$img = GD::Simple->new(400,250);

# draw a red rectangle with blue borders
$img->bgcolor(red);
$img->fgcolor(blue);
$img->rectangle(10,10,50,50);

# draw an empty rectangle with green borders
$img->bgcolor(undef);
$img->fgcolor(green);
$img->rectangle(30,30,100,100);

# move to (80,80) and draw a green line to (100,190)
$img->moveTo(80,80);
$img->lineTo(100,190);

# draw a solid orange ellipse
$img->moveTo(110,100);
$img->bgcolor(orange);
$img->fgcolor(orange);
$img->ellipse(40,40);

# draw a black filled arc
$img->moveTo(150,150);
$img->fgcolor(black);
$img->arc(50,50,0,100,gdNoFill|gdEdged);

# draw a string at (10,180) using the default
# built-in font
$img->moveTo(10,180);
$img->string(This is very simple);

# draw a string at (280,210) using 20 point
# times italic, angled upward 90 degrees
$img->moveTo(280,210);
$img->font(Times:italic);
$img->fontsize(20);
$img->angle(-90);
$img->string(This is very fancy);

# some turtle graphics
$img->moveTo(300,100);
$img->penSize(3,3);
$img->angle(0);
$img->line(20); # 20 pixels going to the right
$img->turn(30); # set turning angle to 30 degrees
$img->line(20); # 20 pixel line
$img->line(20);
$img->line(20);
$img->turn(-90); # set turning angle to -90 degrees
$img->line(50); # 50 pixel line

# draw a cyan polygon edged in blue
my $poly = new GD::Polygon;
$poly->addPt(150,100);
$poly->addPt(199,199);
$poly->addPt(100,199);
$img->bgcolor(cyan);
$img->fgcolor(blue);
$img->penSize(1,1);
$img->polygon($poly);

# convert into png data
print $img->png;

GD::Simple is a subclass of the GD library that shortens many of the long GD method calls by storing information about the pen color, size and position in the GD object itself. It also adds a small number of "turtle graphics" style calls for those who prefer to work in polar coordinates. In addition, the library allows you to use symbolic names for colors, such as "chartreuse", and will manage the colors for you.

The Pen

GD::Simple maintains a "pen" whose settings are used for line- and shape-drawing operations. The pen has the following properties:

fgcolor

The pen foreground color is the color of lines and the borders of filled and unfilled shapes.

bgcolor

The pen background color is the color of the contents of filled shapes.

pensize

The pen size is the width of the pen. Larger sizes draw thicker lines.

position

The pen position is its current position on the canvas in (X,Y) coordinates.

angle

When drawing in turtle mode, the pen angle determines the current direction of lines of relative length.

turn

When drawing in turtle mode, the turn determines the clockwise or counterclockwise angle that the pen will turn before drawing the next line.

font

The font to use when drawing text. Both built-in bitmapped fonts and TrueType fonts are supported.

fontsize

The size of the font to use when drawing with TrueType fonts.

One sets the position and properties of the pen and then draws. As the drawing progresses, the position of the pen is updated.

Methods

GD::Simple introduces a number of new methods, a few of which have the same name as GD::Image methods, and hence change their behavior. In addition to these new methods, GD::Simple objects support all of the GD::Image methods. If you make a method call that isnt directly supported by GD::Simple, it refers the request to the underlying GD::Image object. Hence one can load a JPEG image into GD::Simple and declare it to be TrueColor by using this call, which is effectively inherited from GD::Image:

my $img = GD::Simple->newFromJpeg(./myimage.jpg,1);

The rest of this section describes GD::Simple-specific methods.

$img->moveTo($x,$y)

This call changes the position of the pen without drawing. It moves the pen to position ($x,$y) on the drawing canvas.

$img->move($dx,$dy)
$img->move($dr)

This call changes the position of the pen without drawing. When called with two arguments it moves the pen $dx pixels to the right and $dy pixels downward. When called with one argument it moves the pen $dr pixels along the vector described by the current pen angle.

$img->lineTo($x,$y)

The lineTo() call simultaneously draws and moves the pen. It draws a line from the current pen position to the position defined by ($x,$y) using the current pen size and color. After drawing, the position of the pen is updated to the new position.

$img->line($dx,$dy)
$img->line($dr)

The line() call simultaneously draws and moves the pen. When called with two arguments it draws a line from the current position of the pen to the position $dx pixels to the right and $dy pixels down. When called with one argument, it draws a line $dr pixels long along the angle defined by the current pen angle.

$img->clear

This method clears the canvas by painting over it with the current background color.

$img->rectangle($x1,$y1,$x2,$y2)

This method draws the rectangle defined by corners ($x1,$y1), ($x2,$y2). The rectangles edges are drawn in the foreground color and its contents are filled with the background color. To draw a solid rectangle set bgcolor equal to fgcolor. To draw an unfilled rectangle (transparent inside), set bgcolor to undef.

$img->ellipse($width,$height)

This method draws the ellipse centered at the current location with width $width and height $height. The ellipses border is drawn in the foreground color and its contents are filled with the background color. To draw a solid ellipse set bgcolor equal to fgcolor. To draw an unfilled ellipse (transparent inside), set bgcolor to undef.

$img->arc($cx,$cy,$width,$height,$start,$end [,$style])

This method draws filled and unfilled arcs. See GD for a description of the arguments. To draw a solid arc (such as a pie wedge) set bgcolor equal to fgcolor. To draw an unfilled arc, set bgcolor to undef.

$img->polygon($poly)

This method draws filled and unfilled polygon using the current settings of fgcolor for the polygon border and bgcolor for the polygon fill color. See GD for a description of creating polygons. To draw a solid polygon set bgcolor equal to fgcolor. To draw an unfilled polygon, set bgcolor to undef.

$img->polyline($poly)

This method draws polygons without closing the first and last vertices (similar to GD::Image->unclosedPolygon()). It uses the fgcolor to draw the line.

$img->string($string)

This method draws the indicated string starting at the current position of the pen. The pen is moved to the end of the drawn string. Depending on the font selected with the font() method, this will use either a bitmapped GD font or a TrueType font. The angle of the pen will be consulted when drawing the text. For TrueType fonts, any angle is accepted. For GD bitmapped fonts, the angle can be either 0 (draw horizontal) or -90 (draw upwards).

For consistency between the TrueType and GD font behavior, the string is always drawn so that the current position of the pen corresponds to the bottom left of the first character of the text. This is different from the GD behavior, in which the first character of bitmapped fonts hangs down from the pen point.
This method returns a polygon indicating the bounding box of the rendered text. If an error occurred (such as invalid font specification) it returns undef and an error message in $@.

$metrics = $img->fontMetrics

($metrics,$width,$height) = GD::Simple->fontMetrics($font,$fontsize,$string)

This method returns information about the current font, most commonly a TrueType font. It can be invoked as an instance method (on a previously-created GD::Simple object) or as a class method (on the GD::Simple class).

When called as an instance method, fontMetrics() takes no arguments and returns a single hash reference containing the metrics that describe the currently selected font and size. The hash reference contains the following information:

xheight the base height of the font from the bottom to the top of
a lowercase m

ascent the length of the upper stem of the lowercase d

descent the length of the lower step of the lowercase j

lineheight the distance from the bottom of the j to the top of
the d

leading the distance between two adjacent lines

($delta_x,$delta_y)= $img->stringBounds($string)

This method indicates the X and Y offsets (which may be negative) that will occur when the given string is drawn using the current font, fontsize and angle. When the string is drawn horizontally, it gives the width and height of the strings bounding box.

$delta_x = $img->stringWidth($string)

This method indicates the width of the string given the current font, fontsize and angle. It is the same as ($img->stringBounds($string))[0]

($x,$y) = $img->curPos

Return the current position of the pen. Set the current position using moveTo().

$font = $img->font([$newfont] [,$newsize])

Get or set the current font. Fonts can be GD::Font objects, TrueType font file paths, or fontconfig font patterns like "Times:italic" (see fontconfig). The latter feature requires that you have the fontconfig library installed and are using libgd version 2.0.33 or higher.

As a shortcut, you may pass two arguments to set the font and the fontsize simultaneously. The fontsize is only valid when drawing with TrueType fonts.

$size = $img->fontsize([$newfontsize])

Get or set the current font size. This is only valid for TrueType fonts.

$size = $img->penSize([$newpensize])

Get or set the current pen width for use during line drawing operations.

$angle = $img->angle([$newangle])

Set the current angle for use when calling line() or move() with a single argument.

Here is an example of using turn() and angle() together to draw an octagon. The first line drawn is the downward-slanting top right edge. The last line drawn is the horizontal top of the octagon.

$img->moveTo(200,50);
$img->angle(0);
$img->turn(360/8);
for (1..8) { $img->line(50) }

$angle = $img->turn([$newangle])

Get or set the current angle to turn prior to drawing lines. This value is only used when calling line() or move() with a single argument. The turning angle will be applied to each call to line() or move() just before the actual drawing occurs.
Angles are in degrees. Positive values turn the angle clockwise.

$color = $img->fgcolor([$newcolor])

Get or set the pens foreground color. The current pen color can be set by (1) using an (r,g,b) triple; (2) using a previously-allocated color from the GD palette; or (3) by using a symbolic color name such as "chartreuse." The list of color names can be obtained using color_names().

$color = $img->bgcolor([$newcolor])

Get or set the pens background color. The current pen color can be set by (1) using an (r,g,b) triple; (2) using a previously-allocated color from the GD palette; or (3) by using a symbolic color name such as "chartreuse." The list of color names can be obtained using color_names().

$index = $img->translate_color(@args)

Translates a color into a GD palette or TrueColor index. You may pass either an (r,g,b) triple or a symbolic color name. If you pass a previously-allocated index, the method will return it unchanged.

$index = $img->alphaColor(@args,$alpha)

Creates an alpha color. You may pass either an (r,g,b) triple or a symbolic color name, followed by an integer indicating its opacity. The opacity value ranges from 0 (fully opaque) to 127 (fully transparent).
@names = GD::Simple->color_names

$translate_table = GD::Simple->color_names

Called in a list context, color_names() returns the list of symbolic color names recognized by this module. Called in a scalar context, the method returns a hash reference in which the keys are the color names and the values are array references containing [r,g,b] triples.

$gd = $img->gd

Return the internal GD::Image object. Usually you will not need to call this since all GD methods are automatically referred to this object.

($red,$green,$blue) = GD::Simple->HSVtoRGB($hue,$saturation,$value)

Convert a Hue/Saturation/Value (HSV) color into an RGB triple. The hue, saturation and value are integers from 0 to 255.

($hue,$saturation,$value) = GD::Simple->RGBtoHSV($hue,$saturation,$value)

Convert a Red/Green/Blue (RGB) value into a Hue/Saturation/Value (HSV) triple. The hue, saturation and value are integers from 0 to 255.

COLORS

This script will create an image showing all the symbolic colors.

#!/usr/bin/perl

use strict;
use GD::Simple;

my @color_names = GD::Simple->color_names;
my $cols = int(sqrt(@color_names));
my $rows = int(@color_names/$cols)+1;

my $cell_width = 100;
my $cell_height = 50;
my $legend_height = 16;
my $width = $cols * $cell_width;
my $height = $rows * $cell_height;

my $img = GD::Simple->new($width,$height);
$img->font(gdSmallFont);

for (my $c=0; $cfgcolor($color);
$img->rectangle(@topleft,@botright);
$img->moveTo($topleft[0]+2,$botright[1]+$legend_height-2);
$img->fgcolor(black);
$img->string($color);
}
}

print $img->png;

<<less
Download (0.25MB)
Added: 2007-07-23 License: Perl Artistic License Price:
825 downloads
XML::Simple 2.14

XML::Simple 2.14


XML::Simple is a easy API to maintain XML (esp config files). more>>
XML::Simple is a easy API to maintain XML (esp config files).

SYNOPSIS

use XML::Simple;

my $ref = XMLin([< xml file or string >] [, < options >]);

my $xml = XMLout($hashref [, < options >]);

Or the object oriented way:

require XML::Simple;

my $xs = new XML::Simple(options);

my $ref = $xs->XMLin([< xml file or string >] [, < options >]);

my $xml = $xs->XMLout($hashref [, < options >]);

(or see "SAX SUPPORT" for the SAX way).

To catch common errors:

use XML::Simple qw(:strict);

<<less
Download (0.065MB)
Added: 2006-09-06 License: Perl Artistic License Price:
1151 downloads
DFA::Simple 0.32

DFA::Simple 0.32


DFA::Simple is a Perl module to implement simple Discrete Finite Automata. more>>
DFA::Simple is a Perl module to implement simple Discrete Finite Automata.

SYNOPSIS

my $Obj = new DFA::Simple
or
my $Obj = new DFA::Simple $Transitions;
or
my $Obj = new DFA::Simple $Actions, $StateRules;

$Obj->Actions = [...];
my $Trans = $LP->Actions;

$Obj->StateRules = [...];
my $StateRules = $LP->StateRules;

my $Obj = new DFA::Simple $Actions,[States];

This creates a simple automaton with a finite number of individual states. The short version is that state numbers are just indices into the array.

The state basically binds the rest of the machine together:

1. There might be something you want done whenever you enter a given state (Transition Table)
2. There might be something you want done whenever you leave a given state (Transition Table)
3. You can go to some states from the current state (Action table)
4. There are tests to decide whether you should go to that new state (Action table)
5. There are conditional tasks you can do while sitting in that new state (Action table)

This structure may remind you of the SysV run-level concepts. It is very similar.
At run time you dont typically feed any state numbers to the finite machine; you ignore them. Rather your program may read inputs or such. The tests for the state transition would examine this input, or some other variables to decide which new state to go to. Whenever your code has gotten enough input, it would call the Check_For_NextState() method. This method runs through the tests, and carries out the state transitions ("firing the rules").

<<less
Download (0.011MB)
Added: 2007-05-17 License: Perl Artistic License Price:
894 downloads
ICS::Simple 0.06

ICS::Simple 0.06


ICS::Simple is a simple interface to CyberSource ICS2. more>>
ICS::Simple is a simple interface to CyberSource ICS2.

SYNOPSIS

Here is some basic code. Hopefully Ill come back through soon to document it properly.

use ICS::Simple;

my $ics = ICS::Simple->new(
ICSPath => /opt/ics,
MerchantId => v0123456789, # CyberSource supplies this number to you
Mode => test,
Currency => USD,
Grammar => UpperCamel, # defaults to raw ICS responses, so you might want to set this
#ErrorsTo => all-errors@some.fun.place.com,
CriticalErrorsTo => only-critical-errors@some.fun.place.com,
);

my $request = {
OrderId => order19857219,
FirstName => Fred,
LastName => Smith,
Email => fred.smith@buyer-of-stuff.com,
CardNumber => 4111111111111111,
CardCVV => 123,
CardExpYear => 2008,
CardExpMonth => 12,
BillingAddress => 123 Main St,
BillingCity => Olympia,
BillingRegion => WA,
BillingPostalCode => 98501,
BillingCountryCode => US,
ShippingAddress1 => 6789 Industrial Pl,
ShippingAddress2 => Floor 83, Room 11415,
ShippingCity => Olympia,
ShippingRegion => WA,
ShippingPostalCode => 98506,
ShippingCountryCode => US,
ShippingFee => 25.05,
HandlingFee => 5.00,
Items => [
{ Description => Mega Lizard Monster RC,
Price => 25.00,
SKU => prod15185 },
{ Description => Super Racer Parts Kit,
Price => 15.30,
SKU => prod23523 },
{ Description => Uber Space Jacket,
Price => 72.24,
SKU => prod18718 },
],
};

my $response = $ics->requestBill($request);

if ($response->{success}) {
print "Woo! Success!n";
$response = $response->{response};
print "Thanks for your payment of $$response->{BillAmount}.n";
}
else {
print "Boo! Failure!n";
print "Error: $response->{error}->{description}n";
}

<<less
Download (0.010MB)
Added: 2007-03-21 License: Perl Artistic License Price:
949 downloads
PCL::Simple 1.02

PCL::Simple 1.02


PCL::Simple is a Perl module to create PCL for printing plain text files. more>>
PCL::Simple is a Perl module to create PCL for printing plain text files.

SYNOPSIS

use PCL::Simple qw( PCL_pre PCL_post );

open PLAIN, ready_for_printing.txt or die;

print SNAZZY PCL_pre( -w => 132, -lpp => 66 );
print SNAZZY while ( );
print SNAZZY PCL_post;

close PLAIN;
close SNAZZY;

PCL::Simple will provide PCL strings that cause your printer to print a plain text file with *exactly* the right font -- i.e. the exact font needed to fill the page with as many fixed width characters across and down as you specify.

In addition to providing for your desired width and height layout, the provided PCL strings will also cause the printer to honor your other desires regarding paper size, paper orientation, sides printed, and number of copies.

USAGE

Two functions are exportable: PCL_pre and PCL_post.
PCL_post takes no parameters, it simply returns a string containing the "Printer Reset Command" and "Universal Exit Language Command" as specified by PCL documentation. This string is meant for appending to the end of your plain text document.

PCL_pre takes a list or an href of key value pairs and returns a PCL string for insertion at the beginning of your plain text document. PCL_pre Paramaters are:

-w

Width (Required)

-lpp

Lines Per Page (Required)

-ms

Media Size defaults to letter. Valid values are: executive, letter, legal, ledger, a4, a3, monarch, com-10, d1, c5, b5

-msrc

Media Source is not set by default. Valid values are: numbers from 0 to 69. Generally refers to paper trays or feeders. See your printer documentation for details.

-o

Orientation defaults to portrait. Valid values are: landscape, portrait.

-s

Sides defaults to 0. Valid values are: 0 (Single), 1 (Double Long), 2 (Double Short)

-c

Copies defaults to 1.

<<less
Download (0.005MB)
Added: 2007-04-03 License: Perl Artistic License Price:
565 downloads
HTML::Simple 0.4

HTML::Simple 0.4


HTML::Simple is a simple, dependency free module for generating HTML (and XML). more>>
HTML::Simple is a simple, dependency free module for generating HTML (and XML).

SYNOPSIS

Note: It turns out that TOMC owns the HTML::Simple namespace so Ive moved development of this module to HTML::Tiny. Please use HTML::Tiny in preference to this module.

use HTML::Simple;

my $h = HTML::Simple->new;

# Generate a simple page
print $h->html(
[
$h->head( $h->title( Sample page ) ),
$h->body(
[
$h->h1( { class => main }, Sample page ),
$h->p( Hello, World, { class => detail }, Second para )
]
)
]
);

# Outputs
< html>
< head>
< title>Sample page< /title>
< /head>
< body>
< h1 class="main">Sample page< /h1>
< p>Hello, World< /p>
< p class="detail">Second para< /p>
< /body>
< /html>

<<less
Download (0.010MB)
Added: 2007-07-04 License: Perl Artistic License Price:
843 downloads
Simple Log 2.0.1

Simple Log 2.0.1


Simple Log is a small library that does logging very simply. more>>
Simple Log is a small library that does logging very simply and requires you to do almost nothing (other than actually logging) to get log output to happen. Simple Log is much simpler to use than a logging framework, especially in terms of configuration.
It doesnt attempt to solve every logging problem in one package, but contains enough features to be a viable alternative for most applications that need logging. This tool will handle the logging needs of most small- to large-sized projects, but with an almost non-existent learning curve.
Enhancements:
- This release is primarily about the addition of log rolling (by time of day, file size, or custom strategy), the inclusion of a small but humorous user guide, the fixing of a raft of minor bugs, and the inclusion of a few other small features increasing flexibility.
<<less
Download (0.98MB)
Added: 2006-07-25 License: The Apache License 2.0 Price:
1187 downloads
CGI::Simple 0.079

CGI::Simple 0.079


CGI::Simple is a simple totally OO CGI interface that is CGI.pm compliant. more>>
CGI::Simple is a simple totally OO CGI interface that is CGI.pm compliant.

SYNOPSIS

use CGI::Simple;
$CGI::Simple::POST_MAX = 1024; # max upload via post default 100kB
$CGI::Simple::DISABLE_UPLOADS = 0; # enable uploads

$q = new CGI::Simple;
$q = new CGI::Simple( { foo=>1, bar=>[2,3,4] } );
$q = new CGI::Simple( foo=1&bar=2&bar=3&bar=4 );
$q = new CGI::Simple( *FILEHANDLE );

$q->save( *FILEHANDLE ); # save current object to a file as used by new

@params = $q->param; # return all param names as a list
$value = $q->param(foo); # return the first value supplied for foo
@values = $q->param(foo); # return all values supplied for foo

%fields = $q->Vars; # returns untied key value pair hash
$hash_ref = $q->Vars; # or as a hash ref
%fields = $q->Vars("|"); # packs multiple values with "|" rather than " ";

@keywords = $q->keywords; # return all keywords as a list

$q->param( foo, some, new, values ); # set new foo values
$q->param( -name=>foo, -value=>bar );
$q->param( -name=>foo, -value=>[bar,baz] );

$q->param( foo, some, new, values ); # append values to foo
$q->append( -name=>foo, -value=>bar );
$q->append( -name=>foo, -value=>[some, new, values] );

$q->delete(foo); # delete param foo and all its values
$q->delete_all; # delete everything



$files = $q->upload() # number of files uploaded
@files = $q->upload(); # names of all uploaded files
$filename = $q->param(upload_file) # filename of uploaded file
$mime = $q->upload_info($filename,mime); # MIME type of uploaded file
$size = $q->upload_info($filename,size); # size of uploaded file

my $fh = $q->upload($filename); # get filehandle to read from
while ( read( $fh, $buffer, 1024 ) ) { ... }

# short and sweet upload
$ok = $q->upload( $q->param(upload_file), /path/to/write/file.name );
print "Uploaded ".$q->param(upload_file)." and wrote it OK!" if $ok;

$decoded = $q->url_decode($encoded);
$encoded = $q->url_encode($unencoded);
$escaped = $q->escapeHTML("&);
$unescaped = $q->unescapeHTML("&);

$qs = $q->query_string; # get all data in $q as a query string OK for GET

$q->no_cache(1); # set Pragma: no-cache + expires
print $q->header(); # print a simple header
# get a complex header
$header = $q->header( -type => image/gif
-nph => 1,
-status => 402 Payment required,
-expires =>+24h,
-cookie => $cookie,
-charset => utf-7,
-attachment => foo.gif,
-Cost => $2.00
);
# a p3p header (OK for redirect use as well)
$header = $q->header( -p3p => policyref="http://somesite.com/P3P/PolicyReferences.xml );

@cookies = $q->cookie(); # get names of all available cookies
$value = $q->cookie(foo) # get first value of cookie foo
@value = $q->cookie(foo) # get all values of cookie foo
# get a cookie formatted for header() method
$cookie = $q->cookie( -name => Password,
-values => [superuser,god,my dog woofie],
-expires => +3d,
-domain => .nowhere.com,
-path => /cgi-bin/database,
-secure => 1
);
print $q->header( -cookie=>$cookie ); # set cookie

print $q->redirect(http://go.away.now); # print a redirect header

dienice( $q->cgi_error ) if $q->cgi_error;

CGI::Simple provides a relatively lightweight drop in replacement for CGI.pm. It shares an identical OO interface to CGI.pm for parameter parsing, file upload, cookie handling and header generation. This module is entirely object oriented, however a complete functional interface is available by using the CGI::Simple::Standard module.

Essentially everything in CGI.pm that relates to the CGI (not HTML) side of things is available. There are even a few new methods and additions to old ones! If you are interested in what has gone on under the hood see the Compatibility with CGI.pm section at the end.

In practical testing this module loads and runs about twice as fast as CGI.pm depending on the precise task.

<<less
Download (0.083MB)
Added: 2007-03-08 License: Perl Artistic License Price:
960 downloads
Blog::Simple 0.02

Blog::Simple 0.02


Blog::Simple is a Perl extension for the creation of a simple weblog (blogger) system. more>>
Blog::Simple is a Perl extension for the creation of a simple weblog (blogger) system.

SYNOPSIS

use Blog::Simple;

my $sbO = Blog::Simple->new(); $sbO->create_index(); #generally only needs to be called once

my $content="

blah blah blah in XHTM"p"

Better when done in XHTM"p""; my $title = some title; my $author = a.n. author; my $email = anaouthor@somedomain.net; my $smmry = blah blah; $sbO->add($title,$author,$email,$smmry,$content);

$sbO->render_current(blog_test.xsl,3); $sbO->render_all(blog_test.xsl);

$sbO->remove(08);

<<less
Download (0.007MB)
Added: 2006-09-14 License: Perl Artistic License Price:
1135 downloads
JOpt Simple 2.3.2

JOpt Simple 2.3.2


JOpt Simple is a Java library for parsing command line switches, such as those you might pass to an invocation of javac. more>>
JOpt Simple is a simple, test-driven command line parser for Java programs. JOpt Simple supports POSIX getopt() and GNU getopt_long().
What command line switch syntax does JOpt Simple support?
As closely as possible, JOpt Simple attempts to adhere to the rules of POSIX getopt() and GNU getopt_long(). You can find a brief summary of these rules in the javadoc for class OptionParser.
Enhancements:
- Minor internal changes.
<<less
Download (0.054MB)
Added: 2007-04-22 License: GPL (GNU General Public License) Price:
916 downloads
Simple Backup 1.0

Simple Backup 1.0


Simple Backup is a shell script to create basic backups using tar, grep, sed, and bash. more>>
Simple Backup is a shell script to create basic backups using tar, grep, sed, and bash.

Simple Backup works by using a file that contains the folders to be backed up and a file that contains expressions to exclude certain folders/files.

Usage: backup.sh < backuplist > < excludelist >

Free to use at your own risk. The author cant be held responsible for any side effects
of using this software. Use at your own risk.
<<less
Download (0.003MB)
Added: 2006-07-26 License: Freeware Price:
1186 downloads
MIDI::Simple 0.81

MIDI::Simple 0.81


MIDI::Simple is a procedural/OOP interface for MIDI composition. more>>
MIDI::Simple is a procedural/OOP interface for MIDI composition.

SYNOPSIS

use MIDI::Simple;
new_score;
text_event http://www.ely.anglican.org/parishes/camgsm/bells/chimes.html;
text_event Lord through this hour/ be Thou our guide;
text_event so, by Thy power/ no foot shall slide;
set_tempo 500000; # 1 qn => .5 seconds (500,000 microseconds)
patch_change 1, 8; # Patch 8 = Celesta

noop c1, f, o5; # Setup
# Now play
n qn, Cs; n F; n Ds; n hn, Gs_d1;
n qn, Cs; n Ds; n F; n hn, Cs;
n qn, F; n Cs; n Ds; n hn, Gs_d1;
n qn, Gs_d1; n Ds; n F; n hn, Cs;

write_score westmister_chimes.mid;

This module sits on top of all the MIDI modules -- notably MIDI::Score (so you should skim MIDI::Score) -- and is meant to serve as a basic interface to them, for composition. By composition, I mean composing anew; you can use this module to add to or modify existing MIDI files, but that functionality is to be considered a bit experimental.

This module provides two related but distinct bits of functionality: 1) a mini-language (implemented as procedures that can double as methods) for composing by adding notes to a score structure; and 2) simple functions for reading and writing scores, specifically the scores you make with the composition language.

The fact that this modules interface is both procedural and object-oriented makes it a definite two-headed beast. The parts of the guts of the source code are not for the faint of heart.

<<less
Download (0.061MB)
Added: 2007-07-06 License: Perl Artistic License Price:
841 downloads
Test::Simple 0.70

Test::Simple 0.70


Test::Simple is a Perl module with basic utilities for writing tests. more>>
Test::Simple is a Perl module with basic utilities for writing tests.

SYNOPSIS

use Test::Simple tests => 1;

ok( $foo eq $bar, foo is bar );

** If you are unfamiliar with testing read Test::Tutorial first! **

This is an extremely simple, extremely basic module for writing tests suitable for CPAN modules and other pursuits. If you wish to do more complicated testing, use the Test::More module (a drop-in replacement for this one).
The basic unit of Perl testing is the ok. For each thing you want to test your program will print out an "ok" or "not ok" to indicate pass or fail. You do this with the ok() function (see below).

The only other constraint is you must pre-declare how many tests you plan to run. This is in case something goes horribly wrong during the test and your test program aborts, or skips a test or whatever. You do this like so:

use Test::Simple tests => 23;

You must have a plan.

ok
ok( $foo eq $bar, $name );
ok( $foo eq $bar );

ok() is given an expression (in this case $foo eq $bar). If its true, the test passed. If its false, it didnt. Thats about it.

ok() prints out either "ok" or "not ok" along with a test number (it keeps track of that for you).

# This produces "ok 1 - Hell not yet frozen over" (or not ok)
ok( get_temperature($hell) > 0, Hell not yet frozen over );

If you provide a $name, that will be printed along with the "ok/not ok" to make it easier to find your test when if fails (just search for the name). It also makes it easier for the next guy to understand what your test is for. Its highly recommended you use test names.

All tests are run in scalar context. So this:

ok( @stuff, I have some stuff );
will do what you mean (fail if stuff is empty)

Test::Simple will start by printing number of tests run in the form "1..M" (so "1..5" means youre going to run 5 tests). This strange format lets Test::Harness know how many tests you plan on running in case something goes horribly wrong.
If all your tests passed, Test::Simple will exit with zero (which is normal). If anything failed it will exit with how many failed. If you run less (or more) tests than you planned, the missing (or extras) will be considered failures. If no tests were ever run Test::Simple will throw a warning and exit with 255. If the test died, even after having successfully completed all its tests, it will still be considered a failure and will exit with 255.

So the exit codes are...
0 all tests successful
255 test died or all passed but wrong # of tests run
any other number how many failed (including missing or extras)

If you fail more than 254 tests, it will be reported as 254.

This module is by no means trying to be a complete testing system. Its just to get you started. Once youre off the ground its recommended you look at Test::More.

<<less
Download (0.076MB)
Added: 2007-05-04 License: Perl Artistic License Price:
903 downloads
Secleted [ 0 ] software to compare
  • Page: 1 of 5
  • 1
  • 2
  • 3
  • 4
  • 5