GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
SVN::Dumpfile::Node::Content(3) User Contributed Perl Documentation SVN::Dumpfile::Node::Content(3)

SVN::Dumpfile::Node::Content - Represents the content of a node in a subversion dumpfile.

Objects of this class are used in SVN::Dumpfile::Node objects. For normal dumpfile operations this subclass is an implementation detail. Some scripts however might need to use methods of the class directly.

    use SVN::Dumpfile; # or use SVN::Dumpfile::Node:Content;
    $df = new SVN::Dumpfile ("filename");
    $node = $df->read_node;
    my $content = $node->content;

    # Saves or loads content to file:
    $content->load('filename');
    $content->save('filename');

See SVN::Dumpfile.

The stringification operator '""' is overloaded to call as_string(). So the following two lines give identical results:

    "text " . $content->as_string() . " text"
    "text $content text"

Please note that the content can include binary elements.

new()
Returns a new SVN::Dumpfile::Node::Content object. A initial content can be given as argument.
exists()
Returns true if there is a defined, not empty content.
delete()
Deletes the content of the object (but not the object itself). Don't forget to remove the corresponding header lines by mark the node changed().
value()
value("new value")
value()= "new value"
Returns or sets the content which is returned as lvalue.
as_string()
to_string()
Returns the content as one string. Please note that the string can contain binary elements. This is identical to call value() without an argument and not using it as lvalue.
read($filehandle, $length)
Reads <length> bytes from the given filehandle and stores them as content. Returns true if successful.
write($filehandle)
Writes the content to the given filehandle. Returns true if successful. Returns true if successful.
save($filename)
save($filehandle)
Saves the content in the given file which is created when given as name. This is used to export the content and so differs from write(). Returns true if successful.
load($filename)
load($filehandle)
Loads the content from a given file. The whole file is taken as content. This is used to import content from an external file and so differs from read(). Returns the number of bytes of the loaded content if successful, undef otherwise.
lines()
Returns the number of line breaks (NL, "\012") in the content. This can be used to keep track of the current line number of the dumpfile for warning or error messages, etc..
length()
Returns the length in bytes of the content. To check if there is any content use exists().
2008-10-19 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.