Daizu::File

Description

Daizu::File is a Perl class representing files in working copies. Each object of this class represents a particular file in a Daizu CMS working copy (a record in the wc_file table). METHODS Note that all the functions which return the value of a Subversion property will strip leading and trailing whitespace, and treat a value which is empty or entirely whitespace as if it wasnt set at all. Daizu::File->new($cms, $file_id) Return a new Daizu::File object for the file with the specified ID number. $file->data Return a reference to a string containing the file data (content). $file->wc Return a Daizu::Wc object representing the working copy in which this file lives. $file->guid_uri Return the GUID URI for this file. $file->directory_path Returns the path of a directory, either the same as the file if its a directory itself, or the path of its parent directory, or if its at the top level. $file->permalink Returns the first URL generated by the file, which will be the URL you want to link to most of the time. For articles this will always be the normal HTML version of the article, even if there are also other URLs available for it, and it will always be the first page of multipage articles. For non-article files there is no guarantee about what this will return, but most will only generate a single URL anyway, and for those that dont generators are likely to return the most linkable URL first. The URL returned is an absolute URL provided as a URI object. Returns nothing if the file doesnt generate any URLs. There are some cases where this might not be what you want. For example, the root directory of a website using Daizu::Gen will either not generate a URL at all, or will generate one for a Google sitemap XML file, neither of which is likely to be useful for linking. To get the URL of the website you would probably need to find a file called something like _index.html. On the other hand, the Daizu::Gen::Blog generator will give you a sensible URL for the blog homepage if you call this on its root directory. $file->urls_in_db($method, $argument) Return a list of the URLs (plain strings, each an absolute URI) of the file which have the specified method and argument values, drawing from the url table in the database. $file->article_urls Return information about the URLs which the file should have, if it is an article. Fails if it isnt..

Uri - Daizufile - File - Return - Urls - Directory - Working - Files - Libraries - Programming

Published By:Geoff Richards

License Type:Freeware

Date Added:22 October, 2010

Version:0.3

Price:Free

Downloads:27

Size:419.8 KB

Platform: Linux

What people say
- required fields
     
Related Downloads

XML::Namespace is a Perl module with simple support for XML Namespaces. SYNOPSIS Example 1: using XML::Namespace objects use XML::Namespace; my $xsd = XML::Namespace->new(http://www.w3.

DateOct 6, 2010

AuthorAndy Wardley

Size4.1 KB

LicenseFreeware

PriceFree

PlatformLinux

CategoryLinux Programming

mod_access_referer is a module for the Apache HTTP Server that provides access control based on "Referer" HTTP header content. Why is mod_access_referer useful?

DateAug 24, 2010

AuthorArturo Tena

Size10.2 KB

LicenseFreeware

PriceFree

PlatformLinux

CategoryLinux Internet

WebFS::FileCopy is a Perl module to get, put, move, copy, and delete files located by URIs. SYNOPSIS use WebFS::FileCopy; my @res = get_urls(ftp://www.perl.com, http://www.netscape.

DateNov 1, 2010

AuthorBlair Zajac

Size22.5 KB

LicenseFreeware

PriceFree

PlatformLinux

CategoryLinux Programming

Test::URI is a Perl module that can check Uniform Resource Identifiers (URIs). SYNOPSIS use Test::More tests => 5; use Test::URI; # http://www.example.com:8080/index.html#name uri_scheme_ok( $uri, http ); uri_host_ok( $uri, www.example.

DateOct 17, 2010

Authorbrian d foy

Size5.1 KB

LicenseFreeware

PriceFree

PlatformLinux

CategoryLinux Programming

Apache::ReverseProxy is an Apache mod_perl reverse proxy. SYNOPSIS # In Apache config file < Location / > SetHandler perl-script PerlHandler Apache::ReverseProxy PerlSetVar ReverseProxyConfig /usr/local/apache/conf/rproxy.

DateAug 12, 2010

AuthorClinton Wong

Size6.1 KB

LicenseFreeware

PriceFree

PlatformLinux

CategoryLinux Programming