[Uml-devel] Perl writer patch for added functionality
Anthony Parent
anthony.parent at intel.com
Fri Feb 24 08:29:00 UTC 2006
The attached patch is against the kdesdk-512568 snapshot. it applies to
.../umbrello/umbrello/codegenerators/perlwriter.cpp.
The patch adds functionality to the perl code generator as follows:
- Change %year% to the year that the code was generated.
- Change %package% to the name of the fully qualified package name
- Change %PACKAGE-DECLARE% to several lines of code. This allows embedding a package
declaration in the middle of the a heading template, not just at the end.
- Declares the function arguments
A heading template of:
###############################################################################
# ***** CONFIDENTIAL #
# Copyright (c) %year%, ***** Corporation. All Rights Reserved. #
# This file is furnished under license with ***** Corporation, and may only #
# be used or copied in accordance with the terms of that license. #
###############################################################################
### file %filename%
### brief <short summary of what this file contributes>
###
### author <author>
### date
### ORIG-DATE: 10-Oct-96
### LAST-MOD: 24-Feb-06 at 08:58:33 by Anthony Parent
###
### todo Give some detailed description
###############################################################################
#
# File Info
# File Name : $RCSfile: $
# Version : $Revision: $
# Last Checkin : $Date: $
# Last Author : $Author: $
#
###############################################################################
# $Log: file-hdr.perl,v $
###############################################################################
###############################################################################
=head1 Package %package-name%
=head2 Package Info
Author : <author>
Created : %date%
Last Edited : %date%
=head2 Package Description
=cut
###############################################################################
%PACKAGE-DECLARE%
###########################################################################
# USE STATEMENTS #
###########################################################################
use strict;
Gets changed to:
###############################################################################
# ***** CONFIDENTIAL #
# Copyright (c) 2006, ***** Corporation. All Rights Reserved. #
# This file is furnished under license with ***** Corporation, and may only #
# be used or copied in accordance with the terms of that license. #
###############################################################################
### file FCDC/Savvy/SimTemplate.pm
### brief <short summary of what this file contributes>
###
### author <author>
### date
### ORIG-DATE: 10-Oct-96
### LAST-MOD: 19-Dec-05 at 15:12:44 by Anthony Parent
###
### todo Give some detailed description
###############################################################################
#
# File Info
# File Name : $RCSfile: $
# Version : $Revision: $
# Last Checkin : $Date: $
# Last Author : $Author: $
#
###############################################################################
# $Log: file-hdr.perl,v $
###############################################################################
###############################################################################
=head1 Package FCDC::Savvy::SimTemplate
=head2 Package Info
Author : <author>
Created : Fri Feb 24 2006
Last Edited : Fri Feb 24 2006
=head2 Package Description
=cut
###############################################################################
package FCDC::Savvy::SimTemplate;
#UML_MODELER_BEGIN_PERSONAL_VARS_SimTemplate
#UML_MODELER_END_PERSONAL_VARS_SimTemplate
###########################################################################
# USE STATEMENTS #
###########################################################################
use strict;
#------------- Here is an example of a function definition ------------
=pod
=head3 LoadFile
Parameters :
FilePath : string : The path to the template file to load
Return :
boolean
Description :
Loads a simulation template file
=cut
sub LoadFile
{
my($self,
$FilePath, # string : The path to the template file to load
) = @_;
#UML_MODELER_BEGIN_PERSONAL_CODE_LoadFile
#UML_MODELER_END_PERSONAL_CODE_LoadFile
}
The patch is in a an attached gziped file.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: perlwriter-patch1.gz
Type: application/gzip
Size: 2535 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/umbrello-devel/attachments/20060224/2e99d590/attachment.bin>
More information about the umbrello-devel
mailing list