From domm at zsi.at Tue Sep 2 04:29:28 2003 From: domm at zsi.at (Thomas Klausner) Date: Mon Aug 2 21:39:12 2004 Subject: [Vienna-pm] tech meet etc In-Reply-To: <6D5BF24847A0A44AB725899D3CE6CB69018DCCC8@pcmail4.ubavie.gv.at> References: <6D5BF24847A0A44AB725899D3CE6CB69018DCCC8@pcmail4.ubavie.gv.at> Message-ID: <20030902092928.GG25158@zsi.at> Hi! (ich schick das auch wieder an die Vienna.pm Liste, weils wohl fuer alle interessant ist) On Tue, Sep 02, 2003 at 11:15:15AM +0200, Nagy Wilhelm wrote: > ist u.a. mail verlorengegangen? Nein, war/ist nur grad etwas stressig bei mir.. > > DBI / DBD (mySQL, ODBC) (probleme techniken etc. aufbau einer > > eigenen klassenbibliotek (ich bringe natuerlich ein beispiel mit) DB-Zeugs ist immer interessant. Kennst du im uebrigen Class::DBI? > > oder GUI; wie baue ich eine Win-aehnliches GUI mit CSS und > > perl-modulen (inclusive einer klasse welche dies erm?glicht) Auch sehr interessant. Also ein Webasiertes GUI mit Win-Look'n'Feel? > > Ich koennte auch rein grundsaetzlich ueber projektmanagement > > sprechen > > Thema: "HUCH, ich habe ein projekt was jetzt?" > > Projektmanagement mit schwerpunkt der softwareentwicklung. Was > > todo's und dont's > > (ist halt off-topic aber vielleicht nicht uninteressant) Def. nicht uninteressant. > > [Nagy Wilhelm] Da ich voellig neu in dieser gruppe bin (erst seit > > einigen monaten) und beim letzten meeting ziemlich verloren war (habe die > > perl-crew erst nach der aufloesung gefunden weil ich unter den ganzen > > linuxern verloren gegangen bin ;-))) weiss ich natuerlich nicht was genau > > gew?nscht wird. Koenntest du mir da raten, wenn aus den oben angefuehrten > > dingen nix passt so kann ich natuerlich noch andere dinge. Es gibt ja 2. dinge: 1: das Vienna.pm TechMeet. Es hat bisher erst eines gegeben, da waren so 5-8 Leute und wir haben (nach 2 eher kurzen Talks) recht intesiv ueber div. Perl-Themen gesprochen. Das naechste TechMeet ist fuer den 24.9. geplant. 2. Oesterreichsche Perl Workshop. Hats bisher noch nie gegeben. Geplant ist den Workshop irgendwie an die Wiener Linuxtage anzuhaengen. Zielpublikum ist also quasi dasselbe wie das der Linuxtage (sprich Linux-Anfaenger bis Profis (was nix ueber die Perl-Kenntnisse aussagt)), plus Perl-Leute aus ganz Oesterreich (die ev anreisen wuerden), plus Perl-Leute aus der grossen weiten Welt (zB Deutschland, vielleicht koennen wir jemanden aus London ueberreden (Nick Clark oder Leon Brocard, zB)) Inhaltlich stelle ich mir vor, das wir einerseits ein paar Talks fuer absolute Perl-Neulinge haben ("Warum Perl die beste Programmiersprache ist", etc), aber auch welche fuer Fortgeschritten (wie zB von dir angesprochene GUI/DB-Themen). -- #!/usr/bin/perl http://domm.zsi.at for(ref bless{},just'another'perl'hacker){s-:+-$"-g&&print$_.$/} From ebner at chello.at Sun Sep 7 07:59:25 2003 From: ebner at chello.at (Michael Ebner) Date: Mon Aug 2 21:39:12 2004 Subject: [Vienna-pm] tip fuer script Message-ID: <7410587803.20030907145925@chello.at> Es ist untersagt diese E-Mail Adressen weiter zu reichen oder irgendwelche Werbe- oder Serienmails zu senden! ======================================================= Hallo Freunde, ich suche eine Script (perl) mit dem ich Dateinamen inklusive Unterverzeichnise normalisieren kann. Was verstehe ich darunter: Also ich habe eine Menge Dateien mit allen moeglichen Zeichen drinnen die mir nicht gefallen. Sonderzeichen ? ?????? usw. Am liebsten waere mir ein Script bei dem ich das f?r bestimmte Zeichen festlegen kann, f?r andere Zeichen die unbekannt sind einfach irgend ein Standard Zeichen. Ich bin mir ziemlich sicher das es sowas schon gibt. Ich kann doch nicht der erste und einzige sein der sowas braucht. Weiss jemand zuf?llig einen Namen ich weiss nicht so recht wie ich das in eine Suche bei google verpacken kann? Ich habe schon herum gesucht aber da bekomme ich nicht das was ich mir vorstelle. -- CU Michael mailto:ebner@chello.at ======================================================= Michael Ebner Tel : +43 1 8925777 Mariahilferstrasse 192/3/3-4 Fax : +43 1 8925777 35 A-1150 Wien Mobil: +43 676 7005343 Mail: ebner@chello.at Mail : ebner@fastrun.at ======================================================= From marcel at noug.at Sun Sep 7 08:22:40 2003 From: marcel at noug.at (=?ISO-8859-1?Q?Marcel_Gr=FCnauer?=) Date: Mon Aug 2 21:39:12 2004 Subject: [Vienna-pm] tip fuer script In-Reply-To: <7410587803.20030907145925@chello.at> Message-ID: <5B14F3B0-E136-11D7-88BA-003065F97C4A@noug.at> Hallo, On Sonntag, September 7, 2003, at 02:59 Uhr, Michael Ebner wrote: > ich suche eine Script (perl) mit dem ich Dateinamen inklusive > Unterverzeichnise normalisieren kann. [...] > Am liebsten waere mir ein Script bei dem ich das f?r bestimmte > Zeichen festlegen kann, f?r andere Zeichen die unbekannt sind einfach > irgend ein Standard Zeichen. ich verwende da immer das 'rename'-Programm; ich hab's bei einigen Linux-Distros schon gesehen, aber es ist trivial: #!/usr/bin/perl $operation = shift; for (@ARGV) { $had_been = $_; eval $operation; rename($had_been, $_) unless $had_been eq $_; } Wenn Du etwa alle .mp3-Dateien in einem Directory auf lowercase bringen und die Blanks durch Underscores ersetzen willst: rename '$_=lc;s/\s+/_/g' *.mp3 Und um solche Operationen auf allen oder bestimmten Dateien in einem Verzeichnisbaum auszufuehren, kombiniere es mit find(1) und evtl. xargs(1): find . -name \*.mp3 | xargs rename '$_=lc;s/\s+/_/g' bzw. find . -name \*.mp3 -exec rename '$_=lc;s/\s+/_/g' {} \; Lg, Marcel From hjp-vienna-pm-list at hjp.at Sun Sep 7 08:54:38 2003 From: hjp-vienna-pm-list at hjp.at (Peter J. Holzer) Date: Mon Aug 2 21:39:12 2004 Subject: [Vienna-pm] tip fuer script In-Reply-To: <5B14F3B0-E136-11D7-88BA-003065F97C4A@noug.at> References: <7410587803.20030907145925@chello.at> <5B14F3B0-E136-11D7-88BA-003065F97C4A@noug.at> Message-ID: <20030907135438.GA30979@teal.hjp.at> On 2003-09-07 15:22:40 +0200, Marcel Gr?nauer wrote: > On Sonntag, September 7, 2003, at 02:59 Uhr, Michael Ebner wrote: > > > ich suche eine Script (perl) mit dem ich Dateinamen inklusive > > Unterverzeichnise normalisieren kann. > [...] > > Am liebsten waere mir ein Script bei dem ich das f?r bestimmte > > Zeichen festlegen kann, f?r andere Zeichen die unbekannt sind einfach > > irgend ein Standard Zeichen. > > ich verwende da immer das 'rename'-Programm; ich hab's bei einigen > Linux-Distros schon gesehen, aber es ist trivial: > > #!/usr/bin/perl > $operation = shift; > for (@ARGV) { > $had_been = $_; > eval $operation; > rename($had_been, $_) unless $had_been eq $_; > } Das ist leider im allgemeinen Fall nicht ganz trivial. Wenn Du z.B. Umlaute durch ae, oe, ... ersetzt, und ein Directory enth?lt einen Umlaut, dann existiert entweder das Quell- oder das Zieldirectory zum Zeitpunkt der Umbenennung nicht, wenn Du Filenamen als ganzes behandelst. Hier ist mein Ansatz: ---8<------8<------8<------8<------8<------8<------8<------8<--- #!/usr/bin/perl -w # # $Id: sanitize_umlauts,v 1.1 2002/10/27 12:28:59 hjp Exp $ # use strict; use File::Find; sub wanted { if (/[\204\224\201\216\231\232\341\202]/) { my $new = $_; $new =~ tr/\204\224\201\216\231\232\341\202/????????/; print $File::Find::dir, ": $_ -> $new\n"; rename $_, $new or die "cannot rename $_ to $new: $!"; } } if (@ARGV == 0) { push (@ARGV, "."); } finddepth(\&wanted, @ARGV); print "\n\n"; ---8<------8<------8<------8<------8<------8<------8<------8<--- Die Ersetzung ersetzt MS-DOS Umlaute durch solche des lokalen Charsets. Bitte an die Anforderungen anpassen. Das finddepth macht jeweils ein chdir in das Directory hinein (so dass man nur mit "einfachen" Filenamen zu tun hat) und behandelt das Directory selbst nach allen darin enthaltenen Files und Subdirectories (so dass man es sicher umbenennen kann ohne den weiteren Ablauf zu st?ren). hp -- _ | Peter J. Holzer | Humor ohne Emoticons ist trockener Humor. |_|_) | Sysadmin WSR | | | | hjp@hjp.at | -- Toni Grass in aip __/ | http://www.hjp.at/ | -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: not available Url : http://mail.pm.org/pipermail/vienna-pm/attachments/20030907/3ac978af/attachment.bin From marcel at noug.at Sun Sep 7 09:19:08 2003 From: marcel at noug.at (=?ISO-8859-1?Q?Marcel_Gr=FCnauer?=) Date: Mon Aug 2 21:39:12 2004 Subject: [Vienna-pm] tip fuer script In-Reply-To: <20030907135438.GA30979@teal.hjp.at> Message-ID: <3E75F33E-E13E-11D7-88BA-003065F97C4A@noug.at> On Sonntag, September 7, 2003, at 03:54 Uhr, Peter J. Holzer wrote: >> ich verwende da immer das 'rename'-Programm; ich hab's bei einigen >> Linux-Distros schon gesehen, aber es ist trivial: > > Das ist leider im allgemeinen Fall nicht ganz trivial. Wenn Du z.B. > Umlaute durch ae, oe, ... ersetzt, und ein Directory enth?lt einen > Umlaut, dann existiert entweder das Quell- oder das Zieldirectory zum > Zeitpunkt der Umbenennung nicht, wenn Du Filenamen als ganzes > behandelst. Stimmt, directories sollte man damit nicht umbenennen; da ist ein finddepth angebracht. Aber fuer den trivialen Fall ist es trivial. :) Marcel From domm at zsi.at Tue Sep 16 03:41:24 2003 From: domm at zsi.at (Thomas Klausner) Date: Mon Aug 2 21:39:12 2004 Subject: [Vienna-pm] Naechster TechMeet! Message-ID: <20030916084124.GG1119@zsi.at> Hi! Wie eh schon vor einiger Zeit angekuendigt: Naechster Vienna.pm - TechMeet am MI, 24.9., um 19:00 Ort: universitaet fuer angewandte kunst expositur vis-med Holzhausergasse 4 (5.Stock) 1020 Wien http://www.vis-med.ac.at:8080/Kontakt Programm (vorlaeufig): * Thomas Klausner: CPANTS - CPAN Testing Service * Leo Toetsch (wahrscheinlich): parrot weitere Kurz-Vortrage, Themen, etc sind selbstverstaendlich hochgradig erwuenscht, also wenn irgendwer ueber irgendein Projekt mit halbwegs nachvollziehbarem Perl-bezug reden will (entweder Vortrag, oder auch Diskussion, Feedback etc): Bitte melden! Des weiteren ist naechste Woche Micheal G. Schwern in Wien (auf Urlaub). Ev kommt er auch vorbei. Wer Schwern nicht kennt: Er ist zZ Perl5/6-Quality Assurance Guy und Test-Spezialist. http://search.cpan.org/author/MSCHWERN/ Nach dem TechMeet koennten wir im Fluc weiterplaudern: http://www.fluc.at/240903.html Bis dann! -- #!/usr/bin/perl http://domm.zsi.at for(ref bless{},just'another'perl'hacker){s-:+-$"-g&&print$_.$/} From parasew at sonance.net Sat Sep 20 05:56:43 2003 From: parasew at sonance.net (matthias tarasiewicz) Date: Mon Aug 2 21:39:12 2004 Subject: [Vienna-pm] probleme mit mod_perl2 konfiguaration, Apache/2.0.47 (Trustix) Message-ID: <3F6C326B.2000804@sonance.net> hallo thomas, hallo perlmongers liste tollerweise hab ich's hinbekommen, subversion zu installieren/konfigurieren http://blossom.0rf.at/subversion/ allerdings hab ich noch immer einige probleme mit mod_perl. seltsamerweise werden die skripte nicht ausgefuehrt, obwohl ich genau nach http://perl.apache.org/docs/2.0/user/intro/start_fast.html#Installation vorgegangen bin. zb. http://blossom.0rf.at/perl/toast.pl hab dir die httpd.conf attached, vielleicht faellt dir ja was auf. der apache2 meldet sich ganz normal mit Apache/2.0.47 (Unix) mod_perl/1.99_09 Perl/v5.8.0 mod_ssl/2.0.47 OpenSSL/0.9.7b DAV/2 SVN/0.29.0 PHP/4.3.2 configured -- resuming normal operations und keiner fehlermeldung im error_log mittlerweile hab ichs mit dem block SetHandler perl-script PerlHandler ModPerl::Registry Options ExecCGI laufen bekommen. allerdings printet er den Content-type mit.. und bem versuch, anstelle von ModPerl::Registry die Apache::Registry zu verwenden, bekomme ich die fehlermeldung Can't locate Apache/Registry.pm in @INC ahja und noch ein problem bzw. eine frage: wie sage ich der lokalen cpan-shell, dass mod_perl 2 installiert ist? weil zb. beim versuch mit cpan entsprechende Apache::* module zu holen, will er mod_perl 1 installieren Running make for G/GO/GOZER/mod_perl-1.28.tar.gz komisch, das alles. bin ueber jeden tip sehr dankbar. und schaumal auf was ich nettes hingewiesen worden bin nach einer anfrage auf perlmonks: http://perlmonks.org/index.pl?node_id=292746 Apache::UploadMeter http://search.cpan.org/author/ISAAC/Apache-UploadMeter-0.22/UploadMeter.pm -- MovingMediaMultiplicator! http://mmm.ok.ag Parasew http://parasew.sonance.net From parasew at sonance.net Sat Sep 20 06:06:29 2003 From: parasew at sonance.net (matthias tarasiewicz) Date: Mon Aug 2 21:39:12 2004 Subject: [Vienna-pm] probleme mit mod_perl2 konfiguaration, Apache/2.0.47 (Trustix) In-Reply-To: <3F6C326B.2000804@sonance.net> References: <3F6C326B.2000804@sonance.net> Message-ID: <3F6C34B5.3060303@sonance.net> > hab die httpd.conf attached und natuerlich das attachment vergessen hier nochmals, bin fuer jeden tip dankbar! gruss, matthias -- MovingMediaMultiplicator! http://mmm.ok.ag Parasew http://parasew.sonance.net -------------- next part -------------- # # Based upon the NCSA server configuration files originally by Rob McCool. # # This is the main Apache server configuration file. It contains the # configuration directives that give the server its instructions. # See for detailed information about # the directives. # # Do NOT simply read the instructions in here without understanding # what they do. They're here only as hints or reminders. If you are unsure # consult the online docs. You have been warned. # # The configuration directives are grouped into three basic sections: # 1. Directives that control the operation of the Apache server process as a # whole (the 'global environment'). # 2. Directives that define the parameters of the 'main' or 'default' server, # which responds to requests that aren't handled by a virtual host. # These directives also provide default values for the settings # of all virtual hosts. # 3. Settings for virtual hosts, which allow Web requests to be sent to # different IP addresses or hostnames and have them handled by the # same Apache server process. # # Configuration and logfile names: If the filenames you specify for many # of the server's control files begin with "/" (or "drive:/" for Win32), the # server will use that explicit path. If the filenames do *not* begin # with "/", the value of ServerRoot is prepended -- so "/var/log/httpd/foo.log" # with ServerRoot set to "/etc/httpd" will be interpreted by the # server as "/etc/httpd//var/log/httpd/foo.log". # ### Section 1: Global Environment # # The directives in this section affect the overall operation of Apache, # such as the number of concurrent requests it can handle or where it # can find its configuration files. # # # ServerRoot: The top of the directory tree under which the server's # configuration, error, and log files are kept. # # NOTE! If you intend to place this on an NFS (or otherwise network) # mounted filesystem then please read the LockFile documentation # (available at ); # you will save yourself a lot of trouble. # # Do NOT add a slash at the end of the directory path. # ServerRoot "/etc/httpd" # # The accept serialization lock file MUST BE STORED ON A LOCAL DISK. # LockFile /var/run/httpd/accept.lock # # ScoreBoardFile: File used to store internal server process information. # If unspecified (the default), the scoreboard will be stored in an # anonymous shared memory segment, and will be unavailable to third-party # applications. # If specified, ensure that no two invocations of Apache share the same # scoreboard file. The scoreboard file MUST BE STORED ON A LOCAL DISK. # #ScoreBoardFile /var/run/httpd/apache_runtime_status # # PidFile: The file in which the server should record its process # identification number when it starts. # PidFile /var/run/httpd.pid # # Timeout: The number of seconds before receives and sends time out. # Timeout 300 # # KeepAlive: Whether or not to allow persistent connections (more than # one request per connection). Set to "Off" to deactivate. # KeepAlive On # # MaxKeepAliveRequests: The maximum number of requests to allow # during a persistent connection. Set to 0 to allow an unlimited amount. # We recommend you leave this number high, for maximum performance. # MaxKeepAliveRequests 100 # # KeepAliveTimeout: Number of seconds to wait for the next request from the # same client on the same connection. # KeepAliveTimeout 15 ## ## Server-Pool Size Regulation (MPM specific) ## # prefork MPM # StartServers: number of server processes to start # MinSpareServers: minimum number of server processes which are kept spare # MaxSpareServers: maximum number of server processes which are kept spare # MaxClients: maximum number of server processes allowed to start # MaxRequestsPerChild: maximum number of requests a server process serves StartServers 5 MinSpareServers 5 MaxSpareServers 10 MaxClients 150 MaxRequestsPerChild 0 # worker MPM # StartServers: initial number of server processes to start # MaxClients: maximum number of simultaneous client connections # MinSpareThreads: minimum number of worker threads which are kept spare # MaxSpareThreads: maximum number of worker threads which are kept spare # ThreadsPerChild: constant number of worker threads in each server process # MaxRequestsPerChild: maximum number of requests a server process serves StartServers 2 MaxClients 150 MinSpareThreads 25 MaxSpareThreads 75 ThreadsPerChild 25 MaxRequestsPerChild 0 # perchild MPM # NumServers: constant number of server processes # StartThreads: initial number of worker threads in each server process # MinSpareThreads: minimum number of worker threads which are kept spare # MaxSpareThreads: maximum number of worker threads which are kept spare # MaxThreadsPerChild: maximum number of worker threads in each server process # MaxRequestsPerChild: maximum number of connections per server process NumServers 5 StartThreads 5 MinSpareThreads 5 MaxSpareThreads 10 MaxThreadsPerChild 20 MaxRequestsPerChild 0 # # Listen: Allows you to bind Apache to specific IP addresses and/or # ports, in addition to the default. See also the # directive. # # Change this to Listen on specific IP addresses as shown below to # prevent Apache from glomming onto all bound IP addresses (0.0.0.0) # #Listen 12.34.56.78:80 Listen 80 # # Dynamic Shared Object (DSO) Support # # To be able to use the functionality of a module which was built as a DSO you # have to place corresponding `LoadModule' lines at this location so the # directives contained in it are actually available _before_ they are used. # Statically compiled modules (those listed by `httpd -l') do not need # to be loaded here. # # Example: # LoadModule foo_module modules/mod_foo.so # #LoadModule auth_dbm_module /usr/lib/apache/mod_auth_dbm.so LoadModule file_cache_module /usr/lib/apache/mod_file_cache.so LoadModule cache_module /usr/lib/apache/mod_cache.so LoadModule disk_cache_module /usr/lib/apache/mod_disk_cache.so LoadModule mem_cache_module /usr/lib/apache/mod_mem_cache.so #LoadModule ext_filter_module /usr/lib/apache/mod_ext_filter.so #LoadModule deflate_module /usr/lib/apache/mod_deflate.so #LoadModule headers_module /usr/lib/apache/mod_headers.so #LoadModule usertrack_module /usr/lib/apache/mod_usertrack.so #LoadModule unique_id_module /usr/lib/apache/mod_unique_id.so #LoadModule proxy_module /usr/lib/apache/mod_proxy.so #LoadModule proxy_connect_module /usr/lib/apache/mod_proxy_connect.so #LoadModule proxy_ftp_module /usr/lib/apache/mod_proxy_ftp.so #LoadModule proxy_http_module /usr/lib/apache/mod_proxy_http.so LoadModule ssl_module /usr/lib/apache/mod_ssl.so LoadModule bucketeer_module /usr/lib/apache/mod_bucketeer.so #LoadModule cgi_module /usr/lib/apache/mod_cgi.so #LoadModule rewrite_module /usr/lib/apache/mod_rewrite.so # This is better edited in /etc/httpd/conf.d/httpd-mod_php4.conf #LoadModule php4_module /usr/lib/apache/libphp4.so #: i added mod_perl 1.99_09 module here, DAV for subversion # and some subversion specific things LoadModule perl_module /usr/include/apache/modules/mod_perl.so LoadModule dav_svn_module /usr/lib/apache/mod_dav_svn.so LoadModule authz_svn_module /usr/lib/apache/mod_authz_svn.so PerlModule Apache2 PerlModule Apache::compat PerlModule ModPerl::Registry PerlRequire "/home/httpd/perl/startup.pl" DAV svn SVNPath /usr/share/svn SetOutputFilter DEFLATE SetHandler perl-script PerlHandler ModPerl::Registry Options ExecCGI # # # ExtendedStatus controls whether Apache will generate "full" status # information (ExtendedStatus On) or just basic information (ExtendedStatus # Off) when the "server-status" handler is called. The default is Off. # #ExtendedStatus On ### Section 2: 'Main' server configuration # # The directives in this section set up the values used by the 'main' # server, which responds to any requests that aren't handled by a # definition. These values also provide defaults for # any containers you may define later in the file. # # All of these directives may appear inside containers, # in which case these default settings will be overridden for the # virtual host being defined. # # # If you wish httpd to run as a different user or group, you must run # httpd as root initially and it will switch. # # User/Group: The name (or #number) of the user/group to run httpd as. # . On SCO (ODT 3) use "User nouser" and "Group nogroup". # . On HPUX you may not be able to use shared memory as nobody, and the # suggested workaround is to create a user www and use that user. # NOTE that some kernels refuse to setgid(Group) or semctl(IPC_SET) # when the value of (unsigned)Group is above 60000; # don't use Group #-1 on these systems! # User httpd Group httpd # # ServerAdmin: Your address, where problems with the server should be # e-mailed. This address appears on some server-generated pages, such # as error documents. e.g. admin@your-domain.com # ServerAdmin parasew@gmx.net # # ServerName gives the name and port that the server uses to identify itself. # This can often be determined automatically, but we recommend you specify # it explicitly to prevent problems during startup. # # If this is not set to valid DNS name for your host, server-generated # redirections will not work. See also the UseCanonicalName directive. # # If your host doesn't have a registered DNS name, enter its IP address here. # You will have to access it by its address anyway, and this will make # redirections work in a sensible way. # #ServerName 10.0.0.155:80 # # UseCanonicalName: Determines how Apache constructs self-referencing # URLs and the SERVER_NAME and SERVER_PORT variables. # When set "Off", Apache will use the Hostname and Port supplied # by the client. When set "On", Apache will use the value of the # ServerName directive. # UseCanonicalName Off # # DocumentRoot: The directory out of which you will serve your # documents. By default, all requests are taken from this directory, but # symbolic links and aliases may be used to point to other locations. # DocumentRoot "/home/httpd/html" # # Each directory to which Apache has access can be configured with respect # to which services and features are allowed and/or disabled in that # directory (and its subdirectories). # # First, we configure the "default" to be a very restrictive set of # features. # Options FollowSymLinks AllowOverride None # # Note that from this point forward you must specifically allow # particular features to be enabled - so if something's not working as # you might expect, make sure that you have specifically enabled it # below. # # # This should be changed to whatever you set DocumentRoot to. # # # Possible values for the Options directive are "None", "All", # or any combination of: # Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI Multiviews # # Note that "MultiViews" must be named *explicitly* --- "Options All" # doesn't give it to you. # # The Options directive is both complicated and important. Please see # http://httpd.apache.org/docs-2.0/mod/core.html#options # for more information. # Options -Indexes FollowSymLinks # # AllowOverride controls what directives may be placed in .htaccess files. # It can be "All", "None", or any combination of the keywords: # Options FileInfo AuthConfig Limit # AllowOverride None # # Controls who can get stuff from this server. # Order allow,deny Allow from all # # UserDir: The name of the directory that is appended onto a user's home # directory if a ~user request is received. # UserDir public_html # # Control access to UserDir directories. The following is an example # for a site where these directories are restricted to read-only. # # # AllowOverride FileInfo AuthConfig Limit # Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec # # Order allow,deny # Allow from all # # # Order deny,allow # Deny from all # # # # DirectoryIndex: sets the file that Apache will serve if a directory # is requested. # # The index.html.var file (a type-map) is used to deliver content- # negotiated documents. The MultiViews Option can be used for the # same purpose, but it is much slower. # DirectoryIndex index.html index.html.var index.php index.shtml # In order to serve WAP files, you also need "index.wml". Example: # DirectoryIndex index.html index.html.var index.php index.shtml index.wml # # AccessFileName: The name of the file to look for in each directory # for additional configuration directives. See also the AllowOverride # directive. # AccessFileName .htaccess # # The following lines prevent .htaccess and .htpasswd files from being # viewed by Web clients. # Order allow,deny Deny from all # # TypesConfig describes where the mime.types file (or equivalent) is # to be found. # TypesConfig /etc/mime.types # # DefaultType is the default MIME type the server will use for a document # if it cannot otherwise determine one, such as from filename extensions. # If your server contains mostly text or HTML documents, "text/plain" is # a good value. If most of your content is binary, such as applications # or images, you may want to use "application/octet-stream" instead to # keep browsers from trying to display binary files as though they are # text. # DefaultType text/plain # # The mod_mime_magic module allows the server to use various hints from the # contents of the file itself to determine its type. The MIMEMagicFile # directive tells the module where the hint definitions are located. # MIMEMagicFile conf/magic # # HostnameLookups: Log the names of clients or just their IP addresses # e.g., www.apache.org (on) or 204.62.129.132 (off). # The default is off because it'd be overall better for the net if people # had to knowingly turn this feature on, since enabling it means that # each client request will result in AT LEAST one lookup request to the # nameserver. # HostnameLookups Off # # EnableMMAP: Control whether memory-mapping is used to deliver # files (assuming that the underlying OS supports it). # The default is on; turn this off if you serve from NFS-mounted # filesystems. On some systems, turning it off (regardless of # filesystem) can improve performance; for details, please see # http://httpd.apache.org/docs-2.0/mod/core.html#enablemmap # # EnableMMAP off # # ErrorLog: The location of the error log file. # If you do not specify an ErrorLog directive within a # container, error messages relating to that virtual host will be # logged here. If you *do* define an error logfile for a # container, that host's errors will be logged there and not here. # ErrorLog /var/log/httpd/error_log # # LogLevel: Control the number of messages logged to the error_log. # Possible values include: debug, info, notice, warn, error, crit, # alert, emerg. # LogLevel warn # # The following directives define some format nicknames for use with # a CustomLog directive (see below). # LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined LogFormat "%h %l %u %t \"%r\" %>s %b" common LogFormat "%{Referer}i -> %U" referer LogFormat "%{User-agent}i" agent # # The location and format of the access logfile (Common Logfile Format). # If you do not define any access logfiles within a # container, they will be logged here. Contrariwise, if you *do* # define per- access logfiles, transactions will be # logged therein and *not* in this file. # CustomLog /var/log/httpd/access_log common # # If you would like to have agent and referer logfiles, uncomment the # following directives. # #CustomLog /var/log/httpd/referer_log referer #CustomLog /var/log/httpd/agent_log agent # # If you prefer a single logfile with access, agent, and referer information # (Combined Logfile Format) you can use the following directive. # #CustomLog /var/log/httpd/access_log combined # # Optionally add a line containing the server version and virtual host # name to server-generated pages (internal error documents, FTP directory # listings, mod_status and mod_info output etc., but not CGI generated # documents or custom error documents). # Set to "EMail" to also include a mailto: link to the ServerAdmin. # Set to one of: On | Off | EMail # ServerSignature Email # # Aliases: Add here as many aliases as you need (with no limit). The format is # Alias fakename realname # # Note that if you include a trailing / on fakename then the server will # require it to be present in the URL. So "/icons" isn't aliased in this # example, only "/icons/". If the fakename is slash-terminated, then the # realname must also be slash terminated, and if the fakename omits the # trailing slash, the realname must also omit it. # # We include the /icons/ alias for FancyIndexed directory listings. If you # do not use FancyIndexing, you may comment this out. # Alias /icons/ "/home/httpd/icons/" Options Indexes MultiViews AllowOverride None Order allow,deny Allow from all # # This should be changed to the ServerRoot/manual/. The alias provides # the manual, even if you choose to move your DocumentRoot. You may comment # this out if you do not care for the documentation. # Alias /manual "/home/httpd/html/manual" Options Indexes FollowSymLinks MultiViews IncludesNoExec AddOutputFilter Includes html AllowOverride None Order allow,deny Allow from all # # ScriptAlias: This controls which directories contain server scripts. # ScriptAliases are essentially the same as Aliases, except that # documents in the realname directory are treated as applications and # run by the server when requested rather than as documents sent to the client. # The same rules about trailing "/" apply to ScriptAlias directives as to # Alias. # ScriptAlias /cgi-bin/ "/home/httpd/cgi-bin/" # # Additional to mod_cgid.c settings, mod_cgid has Scriptsock # for setting UNIX socket for communicating with cgid. # #Scriptsock /var/run/cgisock # # "/home/httpd/cgi-bin" should be changed to whatever your ScriptAliased # CGI directory exists, if you have that configured. # AllowOverride None Options None Order allow,deny Allow from all # # changed the following lines for all users to have their own cgi-bin AllowOverride None Options +ExecCGI Order allow,deny Allow from all Alias /perl/ /home/httpd/perl/ SetHandler perl-script PerlResponseHandler ModPerl::Registry PerlOptions +ParseHeaders Options +ExecCGI # # # Redirect allows you to tell clients about documents which used to exist in # your server's namespace, but do not anymore. This allows you to tell the # clients where to look for the relocated document. # Example: # Redirect permanent /foo http://www.example.com/bar # # Directives controlling the display of server-generated directory listings. # # # IndexOptions: Controls the appearance of server-generated directory # listings. # IndexOptions FancyIndexing VersionSort # # AddIcon* directives tell the server which icon to show for different # files or filename extensions. These are only displayed for # FancyIndexed directories. # AddIconByEncoding (CMP,/icons/compressed.gif) x-compress x-gzip AddIconByType (TXT,/icons/text.gif) text/* AddIconByType (IMG,/icons/image2.gif) image/* AddIconByType (SND,/icons/sound2.gif) audio/* AddIconByType (VID,/icons/movie.gif) video/* AddIcon /icons/binary.gif .bin .exe AddIcon /icons/binhex.gif .hqx AddIcon /icons/tar.gif .tar AddIcon /icons/world2.gif .wrl .wrl.gz .vrml .vrm .iv AddIcon /icons/compressed.gif .Z .z .tgz .gz .zip AddIcon /icons/a.gif .ps .ai .eps AddIcon /icons/layout.gif .html .shtml .htm .pdf AddIcon /icons/text.gif .txt AddIcon /icons/c.gif .c AddIcon /icons/p.gif .pl .py AddIcon /icons/f.gif .for AddIcon /icons/dvi.gif .dvi AddIcon /icons/uuencoded.gif .uu AddIcon /icons/script.gif .conf .sh .shar .csh .ksh .tcl AddIcon /icons/tex.gif .tex AddIcon /icons/bomb.gif core AddIcon /icons/back.gif .. AddIcon /icons/hand.right.gif README AddIcon /icons/folder.gif ^^DIRECTORY^^ AddIcon /icons/blank.gif ^^BLANKICON^^ # # DefaultIcon is which icon to show for files which do not have an icon # explicitly set. # DefaultIcon /icons/unknown.gif # # AddDescription allows you to place a short description after a file in # server-generated indexes. These are only displayed for FancyIndexed # directories. # Format: AddDescription "description" filename # #AddDescription "GZIP compressed document" .gz #AddDescription "tar archive" .tar #AddDescription "GZIP compressed tar archive" .tgz # # ReadmeName is the name of the README file the server will look for by # default, and append to directory listings. # # HeaderName is the name of a file which should be prepended to # directory indexes. ReadmeName README.html HeaderName HEADER.html # # IndexIgnore is a set of filenames which directory indexing should ignore # and not include in the listing. Shell-style wildcarding is permitted. # IndexIgnore .??* *~ *# HEADER* README* RCS CVS *,v *,t # # AddEncoding allows you to have certain browsers (Mosaic/X 2.1+) uncompress # information on the fly. Note: Not all browsers support this. # Despite the name similarity, the following Add* directives have nothing # to do with the FancyIndexing customization directives above. # AddEncoding x-compress Z AddEncoding x-gzip gz tgz # # DefaultLanguage and AddLanguage allows you to specify the language of # a document. You can then use content negotiation to give a browser a # file in a language the user can understand. # # Specify a default language. This means that all data # going out without a specific language tag (see below) will # be marked with this one. You probably do NOT want to set # this unless you are sure it is correct for all cases. # # * It is generally better to not mark a page as # * being a certain language than marking it with the wrong # * language! # # DefaultLanguage nl # # Note 1: The suffix does not have to be the same as the language # keyword --- those with documents in Polish (whose net-standard # language code is pl) may wish to use "AddLanguage pl .po" to # avoid the ambiguity with the common suffix for perl scripts. # # Note 2: The example entries below illustrate that in some cases # the two character 'Language' abbreviation is not identical to # the two character 'Country' code for its country, # E.g. 'Danmark/dk' versus 'Danish/da'. # # Note 3: In the case of 'ltz' we violate the RFC by using a three char # specifier. There is 'work in progress' to fix this and get # the reference data for rfc1766 cleaned up. # # Danish (da) - Dutch (nl) - English (en) - Estonian (et) # French (fr) - German (de) - Greek-Modern (el) # Italian (it) - Norwegian (no) - Norwegian Nynorsk (nn) - Korean (ko) # Portugese (pt) - Luxembourgeois* (ltz) # Spanish (es) - Swedish (sv) - Catalan (ca) - Czech(cz) # Polish (pl) - Brazilian Portuguese (pt-br) - Japanese (ja) # Russian (ru) - Croatian (hr) # AddLanguage da .dk AddLanguage nl .nl AddLanguage en .en AddLanguage et .et AddLanguage fr .fr AddLanguage de .de AddLanguage he .he AddLanguage el .el AddLanguage it .it AddLanguage ja .ja AddLanguage pl .po AddLanguage ko .ko AddLanguage pt .pt AddLanguage nn .nn AddLanguage no .no AddLanguage pt-br .pt-br AddLanguage ltz .ltz AddLanguage ca .ca AddLanguage es .es AddLanguage sv .se AddLanguage cz .cz AddLanguage ru .ru AddLanguage tw .tw AddLanguage zh-tw .tw AddLanguage hr .hr # # LanguagePriority allows you to give precedence to some languages # in case of a tie during content negotiation. # # Just list the languages in decreasing order of preference. We have # more or less alphabetized them here. You probably want to change this. # LanguagePriority en da nl et fr de el it ja ko no pl pt pt-br ltz ca es sv tw # # ForceLanguagePriority allows you to serve a result page rather than # MULTIPLE CHOICES (Prefer) [in case of a tie] or NOT ACCEPTABLE (Fallback) # [in case no accepted languages matched the available variants] # ForceLanguagePriority Prefer Fallback # # Specify a default charset for all pages sent out. This is # always a good idea and opens the door for future internationalisation # of your web site, should you ever want it. Specifying it as # a default does little harm; as the standard dictates that a page # is in iso-8859-1 (latin1) unless specified otherwise i.e. you # are merely stating the obvious. There are also some security # reasons in browsers, related to javascript and URL parsing # which encourage you to always set a default char set. # AddDefaultCharset ISO-8859-1 # # Commonly used filename extensions to character sets. You probably # want to avoid clashes with the language extensions, unless you # are good at carefully testing your setup after each change. # See ftp://ftp.isi.edu/in-notes/iana/assignments/character-sets for # the official list of charset names and their respective RFCs # AddCharset ISO-8859-1 .iso8859-1 .latin1 AddCharset ISO-8859-2 .iso8859-2 .latin2 .cen AddCharset ISO-8859-3 .iso8859-3 .latin3 AddCharset ISO-8859-4 .iso8859-4 .latin4 AddCharset ISO-8859-5 .iso8859-5 .latin5 .cyr .iso-ru AddCharset ISO-8859-6 .iso8859-6 .latin6 .arb AddCharset ISO-8859-7 .iso8859-7 .latin7 .grk AddCharset ISO-8859-8 .iso8859-8 .latin8 .heb AddCharset ISO-8859-9 .iso8859-9 .latin9 .trk AddCharset ISO-2022-JP .iso2022-jp .jis AddCharset ISO-2022-KR .iso2022-kr .kis AddCharset ISO-2022-CN .iso2022-cn .cis AddCharset Big5 .Big5 .big5 # For russian, more than one charset is used (depends on client, mostly): AddCharset WINDOWS-1251 .cp-1251 .win-1251 AddCharset CP866 .cp866 AddCharset KOI8-r .koi8-r .koi8-ru AddCharset KOI8-ru .koi8-uk .ua AddCharset ISO-10646-UCS-2 .ucs2 AddCharset ISO-10646-UCS-4 .ucs4 AddCharset UTF-8 .utf8 # The set below does not map to a specific (iso) standard # but works on a fairly wide range of browsers. Note that # capitalization actually matters (it should not, but it # does for some browsers). # # See ftp://ftp.isi.edu/in-notes/iana/assignments/character-sets # for a list of sorts. But browsers support few. # AddCharset GB2312 .gb2312 .gb AddCharset utf-7 .utf7 AddCharset utf-8 .utf8 AddCharset big5 .big5 .b5 AddCharset EUC-TW .euc-tw AddCharset EUC-JP .euc-jp AddCharset EUC-KR .euc-kr AddCharset shift_jis .sjis # # AddType allows you to add to or override the MIME configuration # file mime.types for specific file types. # AddType application/x-tar .tgz # MIME Types for WAP AddType text/vnd.wap.wml .wml AddType image/vnd.wap.wbmp .wbmp AddType application/vnd.wap.wmlc .wmlc AddType text/vnd.wap.wmlscript .wmls AddType application/vnd.wap.wmlscriptc .wmlsc # # AddHandler allows you to map certain file extensions to "handlers": # actions unrelated to filetype. These can be either built into the server # or added with the Action directive (see below) # # To use CGI scripts outside of ScriptAliased directories: # (You will also need to add "ExecCGI" to the "Options" directive.) # AddHandler cgi-script .cgi # # For files that include their own HTTP headers: # #AddHandler send-as-is asis # # For server-parsed imagemap files: # #AddHandler imap-file map # # For type maps (negotiated resources): # (This is enabled by default to allow the Apache "It Worked" page # to be distributed in multiple languages.) # AddHandler type-map var # Filters allow you to process content before it is sent to the client. # # To parse .shtml files for server-side includes (SSI): # (You will also need to add "Includes" to the "Options" directive.) # #AddType text/html .shtml #AddOutputFilter INCLUDES .shtml # # Action lets you define media types that will execute a script whenever # a matching file is called. This eliminates the need for repeated URL # pathnames for oft-used CGI file processors. # Format: Action media/type /cgi-script/location # Format: Action handler-name /cgi-script/location # # # Customizable error responses come in three flavors: # 1) plain text 2) local redirects 3) external redirects # # Some examples: #ErrorDocument 500 "The server made a boo boo." #ErrorDocument 404 /missing.html #ErrorDocument 404 "/cgi-bin/missing_handler.pl" #ErrorDocument 402 http://www.example.com/subscription_info.html # # # Putting this all together, we can internationalize error responses. # # We use Alias to redirect any /error/HTTP_.html.var response to # our collection of by-error message multi-language collections. We use # includes to substitute the appropriate text. # # You can modify the messages' appearance without changing any of the # default HTTP_.html.var files by adding the line: # # Alias /error/include/ "/your/include/path/" # # which allows you to create your own set of files by starting with the # /home/httpd/error/include/ files and copying them to /your/include/path/, # even on a per-VirtualHost basis. The default include files will display # your Apache version number and your ServerAdmin email address regardless # of the setting of ServerSignature. # # The internationalized error documents require mod_alias, mod_include # and mod_negotiation. To activate them, uncomment the following 30 lines. # Alias /error/ "/home/httpd/error/" # # # AllowOverride None # Options IncludesNoExec # AddOutputFilter Includes html # AddHandler type-map var # Order allow,deny # Allow from all # LanguagePriority en es de fr sv # ForceLanguagePriority Prefer Fallback # # # ErrorDocument 400 /error/HTTP_BAD_REQUEST.html.var # ErrorDocument 401 /error/HTTP_UNAUTHORIZED.html.var # ErrorDocument 403 /error/HTTP_FORBIDDEN.html.var # ErrorDocument 404 /error/HTTP_NOT_FOUND.html.var # ErrorDocument 405 /error/HTTP_METHOD_NOT_ALLOWED.html.var # ErrorDocument 408 /error/HTTP_REQUEST_TIME_OUT.html.var # ErrorDocument 410 /error/HTTP_GONE.html.var # ErrorDocument 411 /error/HTTP_LENGTH_REQUIRED.html.var # ErrorDocument 412 /error/HTTP_PRECONDITION_FAILED.html.var # ErrorDocument 413 /error/HTTP_REQUEST_ENTITY_TOO_LARGE.html.var # ErrorDocument 414 /error/HTTP_REQUEST_URI_TOO_LARGE.html.var # ErrorDocument 415 /error/HTTP_SERVICE_UNAVAILABLE.html.var # ErrorDocument 500 /error/HTTP_INTERNAL_SERVER_ERROR.html.var # ErrorDocument 501 /error/HTTP_NOT_IMPLEMENTED.html.var # ErrorDocument 502 /error/HTTP_BAD_GATEWAY.html.var # ErrorDocument 503 /error/HTTP_SERVICE_UNAVAILABLE.html.var # ErrorDocument 506 /error/HTTP_VARIANT_ALSO_VARIES.html.var # # The following directives modify normal HTTP response behavior to # handle known problems with browser implementations. # BrowserMatch "Mozilla/2" nokeepalive BrowserMatch "MSIE 4\.0b2;" nokeepalive downgrade-1.0 force-response-1.0 BrowserMatch "RealPlayer 4\.0" force-response-1.0 BrowserMatch "Java/1\.0" force-response-1.0 BrowserMatch "JDK/1\.0" force-response-1.0 # # The following directive disables redirects on non-GET requests for # a directory that does not include the trailing slash. This fixes a # problem with Microsoft WebFolders which does not appropriately handle # redirects for folders with DAV methods. # BrowserMatch "Microsoft Data Access Internet Publishing Provider" redirect-carefully BrowserMatch "^WebDrive" redirect-carefully # # Allow server status reports, with the URL of http://servername/server-status # Change the ".your-domain.com" to match your domain to enable. # # # SetHandler server-status # Order deny,allow # Deny from all # Allow from .your-domain.com # # # Allow remote server configuration reports, with the URL of # http://servername/server-info (requires that mod_info.c be loaded). # Change the ".your-domain.com" to match your domain to enable. # # # SetHandler server-info # Order deny,allow # Deny from all # Allow from .your-domain.com # # # Proxy Server directives. Uncomment the following lines to # enable the proxy server: # # #ProxyRequests On # # # Order deny,allow # Deny from all # Allow from .your-domain.com # # # Enable/disable the handling of HTTP/1.1 "Via:" headers. # ("Full" adds the server version; "Block" removes all outgoing Via: headers) # Set to one of: Off | On | Full | Block # #ProxyVia On # # To enable the cache as well, edit and uncomment the following lines: # (no cacheing without CacheRoot) # #CacheRoot "/var/cache/httpd" #CacheSize 5 #CacheGcInterval 4 #CacheMaxExpire 24 #CacheLastModifiedFactor 0.1 #CacheDefaultExpire 1 #NoCache a-domain.com another-domain.edu joes.garage-sale.com # # End of proxy directives. # # Bring in additional module-specific configurations # Include conf/ssl.conf ### Section 3: Virtual Hosts # # VirtualHost: If you want to maintain multiple domains/hostnames on your # machine you can setup VirtualHost containers for them. Most configurations # use only name-based virtual hosts so the server doesn't need to worry about # IP addresses. This is indicated by the asterisks in the directives below. # # Please see the documentation at # # for further details before you try to setup virtual hosts. # # You may use the command line option '-S' to verify your virtual host # configuration. # # Use name-based virtual hosting. # #NameVirtualHost * # # VirtualHost example: # Almost any Apache directive may go into a VirtualHost container. # The first VirtualHost section is used for requests without a known # server name. # # # ServerAdmin webmaster@dummy-host.example.com # DocumentRoot /www/docs/dummy-host.example.com # ServerName dummy-host.example.com # ErrorLog /var/log/httpd/dummy-host.example.com-error_log # CustomLog /var/log/httpd/dummy-host.example.com-access_log common # # Here you can add your own config files: Include /etc/httpd/conf.d/*.conf From pilsl at goldfisch.at Mon Sep 22 06:53:49 2003 From: pilsl at goldfisch.at (peter pilsl) Date: Mon Aug 2 21:39:12 2004 Subject: [Vienna-pm] unicode-debakel Message-ID: <1064231629.3f6ee2cd3e72c@www.goldfisch.at> Hallo, perl 5.8.0 unter linux Ich scheitere seit geraumer Zeit daran, unicode-daten korrekt von einem utf-8 webform mittels CGI nach perl und weiter nach postgreSQL zu verarbeiten. In jedem Schritt scheint es hier gravierende Probleme zu geben. Aber ich verstehe auch die perlinterne unicode-abarbeitung nicht. Anbei ein kleines script (ohne CGI und SQL, nur perl), das im wesentlichen ein array mit unicode-strings erstellt, dessen inhalt in kleinbuchstaben umwandelt und dann sortiert und ausgibt. Die Sortierung soll dabei nach deutscher lexiographie erfolgen. dh: A,?,B .,O,?,P ... Vorweg : das script scheitert in allen punkten. Weder schafft es die umwandlung von grossen deutschen umlauten in die entsprechenden Kleinbuchstaben, noch schafft es die Sortierung. Bei der Umwandlung werden die unicode-chars ignoriert und bei der sortierung wird scheinbar stur nach dem ersten byte vorgegangen. Verwirrendes Detail : wenn ich alle unicode-chars >00ff entferne, funktioniert pl?tzlich alles, vermutlich weil dann perl intern eine 8-bit-darstellung verwendet. Das kann man im Script sehr deutlich nachvollziehen, indem man die zeile mit dem smiley auskommentiert. Ich bin mit meiner Weisheit am Ende. Ich habe alle bytes, encoding- und utf8-pragmas ausprobiert, alle m?glichen locale-settings usw. usf. Ich krieg es nicht auf die Reihe. Die Anforderung ist doch nicht so hoch : lowercasen und sortieren von unicodestrings. Bin f?r jede Idee sehr dankbar, peter ============================================= #!/usr/bin/perl -w use strict; use locale; use POSIX qw(locale_h); print setlocale(LC_CTYPE),"\n"; #setlocale(LC_CTYPE,"de_AT"); #print setlocale(LC_CTYPE),"\n"; #binmode(STDOUT,":utf8"); my @s; p("\x{263a} this is a smiley"); # <== COMMENT THIS LINE TO SEE DIFFERENCE p("\x{00e4} this is lower german umlaut-a"); p("\x{00c4} this is upper german umlaut-A"); p("\x{00d6} this is lower german umlaut-o"); p("\x{00f6} this is upper german umlaut-O"); p("a this is a lower a"); p("A this is a upper a"); p("z this is a lower z"); p("b this is a lower b"); p("B this is a upper B"); p("p this is a lower p"); p("P this is a upper P"); p("o this is a lower o"); p("O this is a upper O"); @s=map { lc } @s; @s=sort map {$_." (".sprintf("%04x",ord(substr($_,0,1))).")"} @s; print join("\n",@s),"\n"; sub p{ my $s=shift; #print utf8::valid($s); push(@s,$s); } ============================================= -- IT-Consulting mag. peter pilsl tel:+43-699-1-3574035 fax:+43-699-4-3574035 pilsl@goldfisch.at http://www.goldfisch.at From lt at toetsch.at Mon Sep 22 08:38:31 2003 From: lt at toetsch.at (Leopold Toetsch) Date: Mon Aug 2 21:39:12 2004 Subject: [Vienna-pm] unicode-debakel References: <1064231629.3f6ee2cd3e72c@www.goldfisch.at> Message-ID: <3F6EFB57.2000008@toetsch.at> peter pilsl wrote: > Hallo, > > perl 5.8.0 unter linux > > Aber ich verstehe auch die perlinterne unicode-abarbeitung nicht. Ich nehme an, die relevanten docs hast du gelesen (perluni*, perllocale...) > Vorweg : das script scheitert in allen punkten. Seh ich nicht so, ganz im Gegentum: $ perl u.pl | recode utf8..latin1 de_AT a this is a lower a (0061) a this is a upper a (0061) ? this is lower german umlaut-a (00e4) ? this is upper german umlaut-a (00e4) b this is a lower b (0062) b this is a upper b (0062) o this is a lower o (006f) o this is a upper o (006f) ? this is lower german umlaut-o (00f6) ? this is upper german umlaut-o (00f6) p this is a lower p (0070) p this is a upper p (0070) z this is a lower z (007a) - smiley disabled und am Anfang enabled: - setlocale(LC_COLLATE,"de_AT.utf8"); - binmode(STDOUT,":utf8"); (Ich habe kein passendes term mit utf8 Font, daher die R?ckwandlung nach latin1) leo From rs at ednet.at Mon Sep 22 18:38:27 2003 From: rs at ednet.at (Schroettner Robert) Date: Mon Aug 2 21:39:12 2004 Subject: [Vienna-pm] unicode-debakel In-Reply-To: <1064231629.3f6ee2cd3e72c@www.goldfisch.at> Message-ID: Hallo ! On Mon, 22 Sep 2003, peter pilsl wrote: > Date: Mon, 22 Sep 2003 13:53:49 +0200 > From: peter pilsl > To: "vienna-pm@mail.pm.org" > Subject: [Vienna-pm] unicode-debakel > > > Hallo, > > perl 5.8.0 unter linux > > Ich scheitere seit geraumer Zeit daran, unicode-daten korrekt von einem utf-8 > webform mittels CGI nach perl und weiter nach postgreSQL zu verarbeiten. In > jedem Schritt scheint es hier gravierende Probleme zu geben. ich hab mich da auch schon l?nger rumge?rgert - vergiss perl und unicode! stelle die webseite auf utf-8 und konvertiere unicode dann mit der postgres. zumindest ab 7.2.3 (oder 3.2???) geht das. so hab ich es auch endlich geschafft, vom cgi mit perl in die postgres eingegebenen daten auch unter java wieder richtig auszulesen. (am einfchsten die database selbst gleich in unnicode anlegen) ausserdem verh?st sich das ganze nach einem perl-update onehin wieder anders :-) Liebe Gruesse, Schroettner Robert | Schroettner Robert | IT-Services | Eurodata Datenverarbeitungsdienst Ges.m.b.H. __ _ | Tel: +43-1-7747076-51 / / (_)__ __ ____ __ | +43-664-4345798 / /__/ / _ \/ // /\ \/ / | Fax: +43-1-7747076-12 /____/_/_//_/\_,_/ /_/\_\ | WWW: http://www.ednet.at TUX for President | | EURODATA - WIEN - PRAG - BRUENN - BUDAPEST - BUCAREST From domm at zsi.at Tue Sep 23 02:46:37 2003 From: domm at zsi.at (Thomas Klausner) Date: Mon Aug 2 21:39:12 2004 Subject: [Vienna-pm] ANNOUNCE: Vienna.pm TechMeet Message-ID: <20030923074637.GE2401@zsi.at> Vienna.pm - TechMeet am MI, 24.9., um 19:00 Programm: * Thomas Klausner: CPANTS - CPAN Testing Service * Leo Toetsch: parrot * Matthias Tarasiewicz: fs2 - CMS/Databank fuer alternative Medieninhalte Stargast: * Michael G. Schwern http://search.cpan.org/author/MSCHWERN/ http://magnonel.guild.net/~schwern/ ( WARNUNG: Das Startbild koennte ev leichten Wuergreiz wecken, allerdings ist Schwern eher ein Michael-Moor-NRA-Typ) Assistiernender Stargast: * David "cogent" Hand http://davidhand.com/ Ort: Universitaet fuer Angewandte Kunst Expositur vis-med Holzhausergasse 4 (5.Stock) 1020 Wien http://www.vis-med.ac.at:8080/Kontakt weitere Kurz-Vortrage, Themen, etc sind selbstverstaendlich hochgradig erwuenscht, also wenn irgendwer ueber irgendein Projekt mit halbwegs nachvollziehbarem Perl-bezug reden will (entweder Vortrag, oder auch Diskussion, Feedback etc): Bitte melden! Ebenso waere eine informelle Anmeldung super, zwecks Mini-Catering-Spezifizierung (Getraenke/Kekse) Nach dem TechMeet koennten wir im Fluc weiterplaudern: http://www.fluc.at/240903.html Bis dann! -- #!/usr/bin/perl http://domm.zsi.at for(ref bless{},just'another'perl'hacker){s-:+-$"-g&&print$_.$/} From max at sternwelten.at Thu Sep 25 04:59:39 2003 From: max at sternwelten.at (maximilian attems) Date: Mon Aug 2 21:39:12 2004 Subject: [Vienna-pm] Vienna.pm TechMeet =?iso-8859-1?q?r=E9sum=E9?= Message-ID: <20030925095939.GA3793@mail.sternwelten.at> hey :) below you'll find a resum? of yesterdays TechMeet, it's quick typed in middle of the presentations, so do not expect to much Kwalitee feel free to add any omissions or to correct me thx to domm for the organisation special thx for their presence belongs to Michael G. Schwern and David "cogent" Hand a pleasure to meet you all maks * domm : CPANTS - CPAN Testing Service * maks : vacherie - language learning tool * leo : parrot * wilhelm : xedm * matthias**2 : fs2 - multimedia p2p +database * lukas: mmm - Moving Media Multiplicator domm starts with cpants the basic idea is to test cpan modules after catching ownership he did the obvious: there exists a completly rewroten cpants cpants has to analyse sourcecode because code would probably not compile (os, required modules, missing c libraries, ..) -> parse perl -> cpanratings -> database not yet decided on how to calculate qualiity (Makefile, symlinks, ..) me continues with vacherie a nice tool for learning another language, javascript and interface feeded by a perl script which chooses random vocabularies the database is feeded by individual chosen entries quite a nice sunday afternoon hack .. hope so leo introduces parrot parrot is the new virtual machine Perl6 will be based on parrot iternals based on registers (Integer, double float, Strings, PMC) PMC = Parrot Magic Cookies kind of low level objects ~1200 opcodes for all sort of operations (addition + ..) parrot uses 3-register machine - garbage collection leo shows some nice benchmarks resume: parrot is fast, sometimes 30x faster than perl 5 great final with old mandelbrot c ponie wants to run in 2 years, pie-thon next year for oscon latest parrot 0.11 contains lots of new stuff: can translate files in native executables like elf continuation style calling convention (subroutine return continuation .. restores stacks that subroutine may have changed .. you can jump in also in this subrout ine) the slide where of course done in Parrot!!! unicode + regex engine + perl parser may need some help http://www.parrotcode.org/ wilhelm likes kobol for xedm but runs after his shirt and may hand you over some cute proprietary browsers his application is for governement and subsidiaries it can run on a usb stick, and is very easy to install contains mysql, active state perl (cgi+ dbi + blowfish), modified tinyweb, gui (html + css) looks like acces (!befuddle clerks) can control and start any process like vi or m$ excel xedm has 100 users, specification will also be used in eu tab seperated with left column controll statements (inserts, deletes) .. human readable and machine readable format for excel programmer uses meta objects .. he just configure it further talks planned on the database .. project managment programm was intertroduced yesterday questions: nagy@ubavie.gv.at christian**2 presents fs2 a metamedia p2p sequencing database main approach contrasts the googlish popularity approach important to have a look at rare content metainformation decentralised shall permit distributed media using pointers to the underground stuff interlink media content not anonymosly taking the best out of the internet infrastructure kind of distributed wiki media type recognition done in perl my cpan modules: Digest::MD5, Video::Info; XML::RSS mailinglist and sourceforge link will be posted soon. lukas made the glorious finish with mmm shows hard to find demo stuff opengl demos jackson five, music video sofa surfers opening event 8 october kunsthalle dj female pressure http://mmm.ok.ag/ -- free software is not free at all, and "actually a different form of monopoly" ARLENE MCCARTHY member of the european parliament (labour party) -> http://swpat.ffii.org/#guardian-nhill030619 please pay attention avoiding software patents: -> http://swpat.ffii.org/index.en.html -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: not available Url : http://mail.pm.org/pipermail/vienna-pm/attachments/20030925/c9ac0bf6/attachment.bin From domm at zsi.at Thu Sep 25 05:17:59 2003 From: domm at zsi.at (Thomas Klausner) Date: Mon Aug 2 21:39:13 2004 Subject: [Vienna-pm] Vienna.pm TechMeet r?sum? In-Reply-To: <20030925095939.GA3793@mail.sternwelten.at> References: <20030925095939.GA3793@mail.sternwelten.at> Message-ID: <20030925101759.GE29900@zsi.at> Hi! On Thu, Sep 25, 2003 at 11:59:39AM +0200, maximilian attems wrote: > thx to domm for the organisation thanks to all for coming! > special thx for their presence belongs to > Michael G. Schwern and David "cogent" Hand > domm starts with cpants slides: http://domm.zsi.at/talks/vienna_pm200309/ > christian**2 presents fs2 a metamedia p2p sequencing database that sould be Matthias**2 maks++ for this summary! Hast du ein use.perl journal? Wenn ja, post es doch dort. Wenn nicht kann ich's von meinem aus verlinken.. -- #!/usr/bin/perl http://domm.zsi.at for(ref bless{},just'another'perl'hacker){s-:+-$"-g&&print$_.$/} From max at sternwelten.at Thu Sep 25 06:53:19 2003 From: max at sternwelten.at (maximilian attems) Date: Mon Aug 2 21:39:13 2004 Subject: [Vienna-pm] Vienna.pm TechMeet r?sum? In-Reply-To: <20030925101759.GE29900@zsi.at> References: <20030925095939.GA3793@mail.sternwelten.at> <20030925101759.GE29900@zsi.at> Message-ID: <20030925115319.GF3793@mail.sternwelten.at> thx domm for the use perl journal pointer and the corrections :) the resum? is posted: http://use.perl.org/~maks/journal/14901 -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: not available Url : http://mail.pm.org/pipermail/vienna-pm/attachments/20030925/980e3a46/attachment.bin From parasew at sonance.net Sun Sep 28 17:18:34 2003 From: parasew at sonance.net (matthias tarasiewicz) Date: Mon Aug 2 21:39:13 2004 Subject: [Vienna-pm] slash (slashcode) mit mod_perl2/apache2? Message-ID: <3F775E3A.6090308@sonance.net> hat jemand slash/slashcode auf apache 2/mod_perl2 laufen oder kann mir tips geben, wie das ganze funktionieren koennte? http://slashcode.com http://slashcode.com/faq.shtml http://slashcode.com/docs/INSTALL.html#requirements das problem ist bei mir Apache::ExtUtils, welches definitiv zu mod_perl 1 gehoert... http://search.cpan.org/author/GOZER/mod_perl-1.28/lib/Apache/ExtUtils.pm ich dachte an Apache::Compat vielleicht? irgendwelche tips/ideen? danke, matthias From domm at zsi.at Mon Sep 29 02:16:54 2003 From: domm at zsi.at (Thomas Klausner) Date: Mon Aug 2 21:39:13 2004 Subject: [Vienna-pm] slash (slashcode) mit mod_perl2/apache2? In-Reply-To: <3F775E3A.6090308@sonance.net> References: <3F775E3A.6090308@sonance.net> Message-ID: <20030929071654.GC3444@zsi.at> Hi! On Mon, Sep 29, 2003 at 12:18:34AM +0200, matthias tarasiewicz wrote: > hat jemand slash/slashcode auf apache 2/mod_perl2 laufen oder kann mir > tips geben, wie das ganze funktionieren koennte? > http://slashcode.com > http://slashcode.com/faq.shtml > http://slashcode.com/docs/INSTALL.html#requirements > > das problem ist bei mir Apache::ExtUtils, > welches definitiv zu mod_perl 1 gehoert... > http://search.cpan.org/author/GOZER/mod_perl-1.28/lib/Apache/ExtUtils.pm > > ich dachte an Apache::Compat vielleicht? > irgendwelche tips/ideen? mit mod_perl 2 hab ich noch gra nix gemacht (wird aber mal Zeit...) Hier hast du geschaut: http://perl.apache.org/docs/2.0/user/porting/compat.html ? Sonst: mod_perl mailing list -- #!/usr/bin/perl http://domm.zsi.at for(ref bless{},just'another'perl'hacker){s-:+-$"-g&&print$_.$/} From parasew at sonance.net Mon Sep 29 21:17:23 2003 From: parasew at sonance.net (matthias tarasiewicz) Date: Mon Aug 2 21:39:13 2004 Subject: [Vienna-pm] Class::DBI pod/doc issues and question for m2m +might_have Message-ID: <3F78E7B3.3010209@sonance.net> for having a good usage of Class::DBI, as far as i understood it you have to reference the classes the way you want to use them. this means that the has_a and has_many does not need to be the same as your references in the database. they are much more a tool to get the data in a way you want (Class::DBI is creating SQL queries, joins out of the has_a and has_many methods you define). Class::DBI is very poor documented, at least the main parts are not clear to me since the underlying SQL-structure for the examples is not visible to the user. issues like correct naming of Classes and database-tables become a problem (if you don't know how Class::DBI deals with that). i still didn't get the clue about how to use the Mapping described in the Class::DBI pod, and also still no clue about might_have. if anyone could describe me the both, i would be very happy :) at least i know how to use has_a and has_many correctly (at least i think so, any hints and better ways very welcome ;) (see the perlmonks-thread-link below) On Fri, Sep 05, 2003 at 03:45:58PM -0400, Perrin Harkins wrote: > Since has_many already works as a join when there is no linking table, > the only issue here is handling many-to-many. I think this should be a > separate method, because I find the current syntax for it (with the > array ref in the middle) confusing. > That would mean creating a new > method with no backwards compatibility baggage, and it could have a > clean syntax for specifying the join table, and possibly even accept > an> option to either use a join or do what the current has_many does > for> linking tables. this seems to be a good idea to me since the array ref for many-to-many relations is indeed confusing (i didn't get this running still) for has_a compared to has_many i found it strange that one is depending on correct naming (has_a), the other one completely not. (see my posting on the perlmonks thread for more around that http://perlmonks.org/index.pl?node_id=295028 ) greetings, matthias tarasiewicz -- MovingMediaMultiplicator! http://mmm.ok.ag parasew http://parasew.sonance.net -------------- next part -------------- # this is just a suggestion about how the examples on the Class::DBI pod-manpage # how would you do m:m mapping? # see the examples here # http://search.cpan.org/~tmtm/Class-DBI-0.94/lib/Class/DBI.pm#Mapping # and the correct calling would be like this? my $t=Music::CD->retrieve(1); my @test=$t->styles; # if i have this SQL (mysql) # # CREATE TABLE user ( # id mediumint(7) NOT NULL auto_increment, # firstname varchar(25) NOT NULL, # PRIMARY KEY (id), # ) Type=MyISAM; # # CREATE TABLE user_role ( # entry_id mediumint(7) NOT NULL, # user_id mediumint(7) NOT NULL, # role_id smallint(6) NOT NULL, # ) Type=MyISAM; # # # CREATE TABLE role ( # id smallint(6) NOT NULL auto_increment, # title varchar(50) NOT NULL, # diz varchar(50) NOT NULL, # PRIMARY KEY (id) # ) Type=MyISAM; # # CREATE TABLE entry ( # id mediumint(7) NOT NULL auto_increment, # txt text, # PRIMARY KEY (id) # ) TYPE=MyISAM;default NULL, # so i am wondering how to make a m:m mapping at least to get # the roles a user would have. # i didn't suceed yet. require DBD::mysql; use strict; use warnings; #require Class::DBI::mysql; use vars qw($VERSION); $VERSION = '0.1b'; package FsDBI; use base ('Class::DBI'); FsDBI->set_db('Main', 'DBI:mysql:dbname', 'user', 'pass'); package FsDBI::User; use base ('FsDBI'); FsDBI::User ->table ('user'); FsDBI::User ->columns (Essential => qw(id firstname) ); # ??? # FsDBI::User ->has_many (Roles => ['FsDBI::User::user_role' => 'role_id']); # FsDBI::User ->has_many(Entries => 'FsDBI::Entry', 'owner'); # package FsDBI::User::user_role; use base ('FsDBI'); FsDBI::User::user_role ->table ('user_role'); FsDBI::User::user_role ->columns(Essential => qw(user_id role_id)); #??? # FsDBI::User::user_role ->has_many(Users =>'FsDBI::User','id'); # FsDBI::User::user_role ->has_many(Roles =>'FsDBI::User::Role', 'id'); # package FsDBI::User::Role; use base ('FsDBI'); FsDBI::User::Role ->table ('role'); FsDBI::User::Role ->columns(Essential => qw( id title diz)); From Gernot.Havranek at bertelsmann.at Tue Sep 30 02:04:59 2003 From: Gernot.Havranek at bertelsmann.at (Gernot.Havranek@bertelsmann.at) Date: Mon Aug 2 21:39:13 2004 Subject: [Vienna-pm] =?iso-8859-1?q?Zweite_Perl-Monger_Seite_in_=D6sterre?= =?iso-8859-1?q?ich?= Message-ID: <4B4AF79B34DED21185D10008C75B6E6D0156E649@AZ-MAIL> Hi! Ich bin seit ca. 6 Monaten bei euch angemeldet und hab nun meine eigene Perl-Monger Group er?ffnet! W?rde mich sehr freuen wenn wir ein wenig zusammen arbeiten k?nnten und ihr euch vielleicht auch bei mir anmeldet. Meine Seite findet ihr unter: http://austria-marchfeld.pm.org/ Gruss Gernot! From domm at zsi.at Tue Sep 30 02:21:29 2003 From: domm at zsi.at (Thomas Klausner) Date: Mon Aug 2 21:39:13 2004 Subject: [Vienna-pm] Zweite Perl-Monger Seite in ?sterreich In-Reply-To: <4B4AF79B34DED21185D10008C75B6E6D0156E649@AZ-MAIL> References: <4B4AF79B34DED21185D10008C75B6E6D0156E649@AZ-MAIL> Message-ID: <20030930072128.GA13430@zsi.at> Hi! On Tue, Sep 30, 2003 at 09:04:59AM +0200, Gernot.Havranek@bertelsmann.at wrote: > Ich bin seit ca. 6 Monaten bei euch angemeldet und hab nun > meine eigene Perl-Monger Group er?ffnet! > > W?rde mich sehr freuen wenn wir ein wenig zusammen arbeiten k?nnten und > ihr euch vielleicht auch bei mir anmeldet. > > Meine Seite findet ihr unter: http://austria-marchfeld.pm.org/ 1. Super. Mehr aktiver Perl-Leute. Wieviele Marchfelder gibts denn? 2. Hab mich mal dort subskribiert 3. Aber: Macht es wirklich Sinn, die Gruppe zu splitten? So viel Traffic ist auf vienna-pm ja nicht... Und das Marchfeld ist ja auch nicht eine Weltreise von Wien entfernt. Ich "fuerchte" mich halt ein bischen vor a) einer Zerspragelung oder b) Cross-Posting-Excessen. -- #!/usr/bin/perl http://domm.zsi.at for(ref bless{},just'another'perl'hacker){s-:+-$"-g&&print$_.$/} From Gernot.Havranek at bertelsmann.at Tue Sep 30 02:41:52 2003 From: Gernot.Havranek at bertelsmann.at (Gernot.Havranek@bertelsmann.at) Date: Mon Aug 2 21:39:13 2004 Subject: AW: [Vienna-pm] Zweite Perl-Monger Seite in ?sterreich Message-ID: <4B4AF79B34DED21185D10008C75B6E6D0156E64C@AZ-MAIL> Hi! Die Marchfelder Gruppe ist noch im entstehen! Ich hoffe das bald recht viele Leute dabei sind! Bei Interesse k?nnen wir auch gerne etwas gemeinsames machen! Gruss > -----Urspr?ngliche Nachricht----- > Von: Thomas Klausner [SMTP:domm@zsi.at] > Gesendet am: Dienstag, 30. September 2003 09:21 > An: vienna-pm@mail.pm.org > Betreff: Re: [Vienna-pm] Zweite Perl-Monger Seite in ?sterreich > > Hi! > > On Tue, Sep 30, 2003 at 09:04:59AM +0200, Gernot.Havranek@bertelsmann.at > wrote: > > > Ich bin seit ca. 6 Monaten bei euch angemeldet und hab nun > > meine eigene Perl-Monger Group er?ffnet! > > > > W?rde mich sehr freuen wenn wir ein wenig zusammen arbeiten k?nnten und > > ihr euch vielleicht auch bei mir anmeldet. > > > > Meine Seite findet ihr unter: http://austria-marchfeld.pm.org/ > > 1. Super. Mehr aktiver Perl-Leute. Wieviele Marchfelder gibts denn? > > 2. Hab mich mal dort subskribiert > > 3. Aber: Macht es wirklich Sinn, die Gruppe zu splitten? So viel Traffic > ist > auf vienna-pm ja nicht... Und das Marchfeld ist ja auch nicht eine > Weltreise > von Wien entfernt. Ich "fuerchte" mich halt ein bischen vor a) einer > Zerspragelung oder b) Cross-Posting-Excessen. > > > -- > #!/usr/bin/perl http://domm.zsi.at > for(ref bless{},just'another'perl'hacker){s-:+-$"-g&&print$_.$/} > _______________________________________________ > Vienna-pm mailing list > Vienna-pm@mail.pm.org > http://mail.pm.org/mailman/listinfo/vienna-pm From Gernot.Havranek at bertelsmann.at Tue Sep 30 04:10:41 2003 From: Gernot.Havranek at bertelsmann.at (Gernot.Havranek@bertelsmann.at) Date: Mon Aug 2 21:39:13 2004 Subject: [Vienna-pm] Werbung in eigener Sache Message-ID: <4B4AF79B34DED21185D10008C75B6E6D0156E652@AZ-MAIL> Hi! Hinweis auf das wohl beste deutsche Perl-Forum! Perl-Community.de -> http://www.perl-community.de/ Gruss Gernot (aka havi) From domm at zsi.at Tue Sep 30 05:24:38 2003 From: domm at zsi.at (Thomas Klausner) Date: Mon Aug 2 21:39:13 2004 Subject: [Vienna-pm] Werbung in eigener Sache In-Reply-To: <4B4AF79B34DED21185D10008C75B6E6D0156E652@AZ-MAIL> References: <4B4AF79B34DED21185D10008C75B6E6D0156E652@AZ-MAIL> Message-ID: <20030930102437.GH13430@zsi.at> Hi! On Tue, Sep 30, 2003 at 11:10:41AM +0200, Gernot.Havranek@bertelsmann.at wrote: > Hi! aja, das crossposten geht schon los... > Hinweis auf das wohl beste deutsche Perl-Forum! > > Perl-Community.de -> http://www.perl-community.de/ Wie sagte Sven Guckes mal so schoen: "Webforen sind fuer Weicheier" :-) Ich persoenlich ziehe Mailinglisten Webforen auch vor. Und dann noch (aber das von einer HardCore OpenSource Perspektive): Das Ding basiert auf Ikonboard (www.ikonboard.com). Was fuer eine Sprache verwendet das Ding? Hab dort ein wenig rumgesurft, aber nix gefunden. Auf dem perl-Community-Server rennt auf jeden Fall PHP (autsch) und mod_perl (yeah!) Aber, was ich eh schon mal die laengste Zeit fragen wollte: Besteht Interesse an einem Oesterreichischem Chat-Channel? Ich faende das ganz interessant, allerdings hab ich keine Ahnung wie/wo man einen IRC-Server etc bekommt, bzw welchen man verwenden kann (oder einfach irc.perl.org #austria.pm oder so? -- #!/usr/bin/perl http://domm.zsi.at for(ref bless{},just'another'perl'hacker){s-:+-$"-g&&print$_.$/} From martin at leyrer.priv.at Tue Sep 30 05:42:49 2003 From: martin at leyrer.priv.at (Martin 'm3' Leyrer) Date: Mon Aug 2 21:39:13 2004 Subject: [Vienna-pm] Werbung in eigener Sache In-Reply-To: <4B4AF79B34DED21185D10008C75B6E6D0156E652@AZ-MAIL> Message-ID: <3F797A49.10148.929A608@localhost> Am 30 Sep 2003 um 11:10, schrieb Gernot.Havranek@bertelsmann.a: > Hi! > > Hinweis auf das wohl beste deutsche Perl-Forum! > > Perl-Community.de -> http://www.perl-community.de/ Webforen sind f?r Weicheier! ... by Sven Guckes http://www.linuxwochen.at/cgi-bin/index?id=100000122 /me zieht sich seine feuerfeste Unterwaesche an :) -- Martin 'm3' Leyrer mailto:martin@leyrer.priv.at Jack of All Trades Die Meldung zur Mail: Math problems?? Call 1-800-10x(24+13)-(64-8y)/2+36x-17 From Gernot.Havranek at bertelsmann.at Tue Sep 30 05:45:09 2003 From: Gernot.Havranek at bertelsmann.at (Gernot.Havranek@bertelsmann.at) Date: Mon Aug 2 21:39:13 2004 Subject: AW: [Vienna-pm] Werbung in eigener Sache Message-ID: <4B4AF79B34DED21185D10008C75B6E6D0156E653@AZ-MAIL> Ich dachte mir das es vielleicht ganz gut ist, wenn sich die einzigen zwei ?sterreichischen Perl-Monger Groups mal kennenlernen! Lad dir das Ikonboard doch mal ab und sieh selbst... Gruss havi > -----Urspr?ngliche Nachricht----- > Von: Thomas Klausner [SMTP:domm@zsi.at] > Gesendet am: Dienstag, 30. September 2003 12:25 > An: vienna-pm@mail.pm.org > Betreff: Re: [Vienna-pm] Werbung in eigener Sache > > Hi! > > On Tue, Sep 30, 2003 at 11:10:41AM +0200, Gernot.Havranek@bertelsmann.at > wrote: > > Hi! > > aja, das crossposten geht schon los... > > > Hinweis auf das wohl beste deutsche Perl-Forum! > > > > Perl-Community.de -> http://www.perl-community.de/ > > Wie sagte Sven Guckes mal so schoen: > "Webforen sind fuer Weicheier" > > :-) > > Ich persoenlich ziehe Mailinglisten Webforen auch vor. > > Und dann noch (aber das von einer HardCore OpenSource Perspektive): > Das Ding basiert auf Ikonboard (www.ikonboard.com). Was fuer eine Sprache > verwendet das Ding? Hab dort ein wenig rumgesurft, aber nix gefunden. Auf > dem perl-Community-Server rennt auf jeden Fall PHP (autsch) und mod_perl > (yeah!) > > Aber, was ich eh schon mal die laengste Zeit fragen wollte: > Besteht Interesse an einem Oesterreichischem Chat-Channel? > > Ich faende das ganz interessant, allerdings hab ich keine Ahnung wie/wo > man > einen IRC-Server etc bekommt, bzw welchen man verwenden kann (oder einfach > irc.perl.org #austria.pm oder so? > > -- > #!/usr/bin/perl http://domm.zsi.at > for(ref bless{},just'another'perl'hacker){s-:+-$"-g&&print$_.$/} > _______________________________________________ > Vienna-pm mailing list > Vienna-pm@mail.pm.org > http://mail.pm.org/mailman/listinfo/vienna-pm From parasew at sonance.net Tue Sep 30 06:36:40 2003 From: parasew at sonance.net (matthias tarasiewicz) Date: Mon Aug 2 21:39:13 2004 Subject: [Vienna-pm] Werbung in eigener Sache In-Reply-To: <20030930102437.GH13430@zsi.at> References: <4B4AF79B34DED21185D10008C75B6E6D0156E652@AZ-MAIL> <20030930102437.GH13430@zsi.at> Message-ID: <3F796AC8.8060109@sonance.net> >>Hinweis auf das wohl beste deutsche Perl-Forum! >>Perl-Community.de -> http://www.perl-community.de/ > > Wie sagte Sven Guckes mal so schoen: > "Webforen sind fuer Weicheier" > :-) > Ich persoenlich ziehe Mailinglisten Webforen auch vor. trotzdem: hat jemand weitere tips zu frameworks bzw. foren wie ikonboard, die perl-basiert sind? (+unter der gnu lizenz waere der hammer) slash ist zu aufwendig, und rennt (noch) nicht unter mod_perl2/apache2 (siehe http://perlmonks.org/index.pl?node_id=294820 ) > Aber, was ich eh schon mal die laengste Zeit fragen wollte: > Besteht Interesse an einem Oesterreichischem Chat-Channel? jaaaaa! > Ich faende das ganz interessant, allerdings hab ich keine Ahnung wie/wo man > einen IRC-Server etc bekommt, bzw welchen man verwenden kann (oder einfach > irc.perl.org #austria.pm oder so? irc.perl.org #austria.pm find ich schon super. passend.. ;) gruss, matthias From domm at zsi.at Tue Sep 30 06:46:20 2003 From: domm at zsi.at (Thomas Klausner) Date: Mon Aug 2 21:39:13 2004 Subject: [Vienna-pm] Werbung in eigener Sache In-Reply-To: <3F796AC8.8060109@sonance.net> References: <4B4AF79B34DED21185D10008C75B6E6D0156E652@AZ-MAIL> <20030930102437.GH13430@zsi.at> <3F796AC8.8060109@sonance.net> Message-ID: <20030930114620.GK13430@zsi.at> Hi! On Tue, Sep 30, 2003 at 01:36:40PM +0200, matthias tarasiewicz wrote: > trotzdem: hat jemand weitere tips zu frameworks bzw. foren wie > ikonboard, die perl-basiert sind? (+unter der gnu lizenz waere der hammer) > > slash ist zu aufwendig, und rennt (noch) nicht unter mod_perl2/apache2 > (siehe http://perlmonks.org/index.pl?node_id=294820 ) ich weiss nix, sorry. mod_perl 2 ist halt noch unstable / BETA. Auch wenn viele Distros das schon dazupacken. Ist aber IMO ein Fehler der Distributoren (RedHat zB hat schon seit Ewigkeiten Apache 2 drauf, was ein vielzahl von verzweifelten Hilferufen auf der mod_perl-Liste zur Folge hatte. > irc.perl.org #austria.pm find ich schon super. > passend.. hab dort gerade gejoint... -- #!/usr/bin/perl http://domm.zsi.at for(ref bless{},just'another'perl'hacker){s-:+-$"-g&&print$_.$/} From parasew at sonance.net Tue Sep 30 16:23:04 2003 From: parasew at sonance.net (matthias tarasiewicz) Date: Mon Aug 2 21:39:13 2004 Subject: [Vienna-pm] Re: Class::DBI pod/doc issues and question for m2m +might_have In-Reply-To: <3F78F364.2000003@elem.com> References: <3F78E7B3.3010209@sonance.net> <3F78F364.2000003@elem.com> Message-ID: <3F79F438.6090008@sonance.net> perrin, i hope it's not a problem, but i thought it might be nice to reply to the whole list instead just to you personally. i finally have the answers to my problems/questions. for reference, i attached all the important information from the last mail with my question. Perrin Harkins wrote: > On Tue, 2003-09-30 at 14:43, matthias tarasiewicz wrote: > >>package FsDBI::User; >> use base ('FsDBI'); >> __PACKAGE__ ->table ('user'); >> __PACKAGE__ ->columns (Essential => qw(id accountname firstname >>lastname) ); >> __PACKAGE__ ->has_many (thisismyrole=> ['FsDBI::User::RoleRef' => >>'role_id']); > > > You normally need to give an extra argument to has_many that tells it > which column of the FsDBI::User::RoleRef class to look in. You can > leave this out when that column has the same name as the current class > (i.e. "user"), but in this case it doesn't. > > __PACKAGE__->has_many (thisismyrole=> ['FsDBI::User::RoleRef' => > 'role_id'], 'user_id'); > > - Perrin thank you very much. this was the information i was missing to get this running. this is definitely missing in the POD of Class::DBI! finally, the follwing was working for my script #!/usr/bin/perl use FsDBI; # retrieve user with id=1 my $test=FsDBI::User->retrieve(1); print "user ".$test->accountname."\n"; # cycle through all the entries the user has # and print the diz-field of the entries foreach my $fugu ($test->UserRoles) { print $fugu->diz; print "\n"; } Perrin Harkins wrote: > matthias tarasiewicz wrote: >> for having a good usage of Class::DBI, as far as i understood it you >> have to reference the classes the way you want to use them. >> this means that the has_a and has_many does not need to be the same as >> your references in the database. > > These will only work if you actually have the references in the > database. All they do is issue SQL queries, so your cd table has to > have a column holding an artist ID in order for your artist class to do > a has_many cds. If you're saying that it's not necessary to turn every > single foreign key into a has_a or has_many, then I agree. this is what i actually meant. > Writing good documentation is hard and takes a lot of time. I think the > Class::DBI docs are quite good. Adding some example SQL tables to go > along with the music examples in the synopsis sounds like a good idea. I > think the music example is better than the user/role stuff in your > examples at the end, because it's more universal. > yes, that's a good thing to put the underlying database in the pod, since things confused me a lot in those examples. my tables where more to illustrate you my problems, no suggestions for becoming part of the documentation ;) >> issues like correct naming of Classes and database-tables become a >> problem > > > I'm not sure what you mean by this. You can use any class or table name > you like. > see above, i had problems with the mapping as described in the pod since i did not know much about the database-table names... > The many-to-many example in the documentation works like this: > > 1) Create classes for a CD table, a STYLE table, and a CD_STYLE table > linking them together. > > 2) In your CD class, say it has_many CD_STYLES. > > 3) In your CD_STYLES class, say it has_a STYLE. > > That's it. Then you can do this: > > sub styles { > my $self = shift; > return map $_->STYLE, $self->CD_STYLES; > } > > Or you can abbreviate that like this: > > Music::CD->has_many(STYLES => [ 'CD_STYLE' => 'STYLE' ]); > > The might_have work just like has_a, but it can also import some fields > from the other object. > this plus the last mail you sent me (see above) definitely should go in the POD! very important since this was the reason why i was mingling with data for hours (not to say days) > I agree, a many-to-many method would be useful. If you'd like to try > writing one, look at the has_many method. uh, i think this might take some time until i'm ready for that ... ;) >> for has_a compared to has_many i found it strange that one is >> depending on correct naming (has_a), the other one completely not. > > has_a doesn't depend on naming. You tell it the name of the accessor in > the current class, and the name of the class to create. They can have > any names you want. It assumes that the accessor you specify will > return a value that can be used as the primary key on the class. > to some point, it depends on naming (as far as i can tell) if we take the example you posted on perlmonks http://perlmonks.org/index.pl?node_id=295176 you have to create a sub for using a has_a with another accessor name than the key sub accessor_name { my ($class, $column) = @_; $column =~ s/role_id/wild_and_crazy_role/; return $column; } while in has_a you can call the accessor anything you want, because of the additional argument you can pass: __PACKAGE__ ->has_many(ihavesomuchroles => 'MyPackage::role','id'); where 'id' would be the id from MyPackage::role >> # ??? >> # FsDBI::User ->has_many (Roles => ['FsDBI::User::user_role' => >> 'role_id']); > > > Yes. > >> #??? >> # FsDBI::User::user_role ->has_many(Users =>'FsDBI::User','id'); > > > No, has_a, not has_many. This one is not needed if you just want to set > up $user->roles(). > >> # FsDBI::User::user_role ->has_many(Roles =>'FsDBI::User::Role', >> 'id'); > > > No, has_a again. > > - Perrin thanks for all the help and greetings, matthias -- that's the way i like I.T. http://fs2.at -------------- next part -------------- perrin, first of all thanks for your reply on my first mail. i am trying for hours now to understand the m:m mapping, but still don't get it running. maybe you can take a look as i am completely lost: # i have still problems with m:m (many to many) mapping and Class::DBI # http://search.cpan.org/~tmtm/Class-DBI-0.94/lib/Class/DBI.pm#Mapping #in a nearby script i call like this use FsDBI; my $test=FsDBI::User->retrieve(1); my @gugu= $test->thisismyrole; # i always get the error # Use of 'croak' is deprecated at /usr/lib/perl5/site_perl/5.8.0/Class/DBI.pm line 950. # Use '_croak' instead is not a column of FsDBI::User::roleref at ./test.pl line 7 # i have this SQL (mysql) # # CREATE TABLE user ( # id mediumint(7) NOT NULL auto_increment, # firstname varchar(25) NOT NULL, # PRIMARY KEY (id), # ) Type=MyISAM; # # CREATE TABLE user_role ( # entry_id mediumint(7) NOT NULL, # user_id mediumint(7) NOT NULL, # role_id smallint(6) NOT NULL, # ) Type=MyISAM; # # # CREATE TABLE role ( # id smallint(6) NOT NULL auto_increment, # title varchar(50) NOT NULL, # diz varchar(50) NOT NULL, # PRIMARY KEY (id) # ) Type=MyISAM; # # CREATE TABLE entry ( # id mediumint(7) NOT NULL auto_increment, # txt text, # PRIMARY KEY (id) # ) TYPE=MyISAM;default NULL, # so i am wondering how to make a m:m mapping at least to get # the roles a user would have. # i didn't suceed yet. require DBD::mysql; use strict; use warnings; #require Class::DBI::mysql; use vars qw($VERSION); $VERSION = '0.1b'; package FsDBI; use base ('Class::DBI'); FsDBI->set_db('Main', 'DBI:mysql:dbname', 'user', 'pass'); package FsDBI::User; use base ('FsDBI'); __PACKAGE__ ->table ('user'); __PACKAGE__ ->columns (Essential => qw(id accountname firstname lastname) ); __PACKAGE__ ->has_many (thisismyrole=> ['FsDBI::User::RoleRef' => 'role_id']); package FsDBI::User::RoleRef; use base ('FsDBI'); __PACKAGE__ ->table ('user_role'); __PACKAGE__ ->columns(Essential => qw(user_id role_id)); __PACKAGE__ ->has_a (role_id =>'FsDBI::User::Role'); __PACKAGE__ ->has_a (user_id =>'FsDBI::User'); package FsDBI::User::Role; use base ('FsDBI'); __PACKAGE__ ->table ('role'); __PACKAGE__ ->columns(Essential => qw( id title diz)); From fh at laudatio.com Tue Sep 30 17:18:41 2003 From: fh at laudatio.com (Florian Helmberger) Date: Mon Aug 2 21:39:13 2004 Subject: [Vienna-pm] Werbung in eigener Sache In-Reply-To: <20030930102437.GH13430@zsi.at> Message-ID: <0C20B47A-F394-11D7-86E0-000393875BF8@laudatio.com> On Dienstag, September 30, 2003, at 12:24 Uhr, Thomas Klausner wrote: > Aber, was ich eh schon mal die laengste Zeit fragen wollte: > Besteht Interesse an einem Oesterreichischem Chat-Channel? > > Ich faende das ganz interessant, allerdings hab ich keine Ahnung > wie/wo man > einen IRC-Server etc bekommt, bzw welchen man verwenden kann (oder > einfach > irc.perl.org #austria.pm oder so? Hi. Erm, Marcel hat recht gute Kontakte zu London.pm (http://london.pm.org), die haben auch einen sehr aktiven IRC-Channel auf einem eigenen Server (glaube ich), da koennte man sicher was machen denke ich. LG, Florian -- 0699 109 24 24 5 - http://www.laudatio.com From domm at zsi.at Tue Sep 30 17:21:58 2003 From: domm at zsi.at (Thomas Klausner) Date: Mon Aug 2 21:39:13 2004 Subject: [Vienna-pm] Werbung in eigener Sache In-Reply-To: <0C20B47A-F394-11D7-86E0-000393875BF8@laudatio.com> References: <20030930102437.GH13430@zsi.at> <0C20B47A-F394-11D7-86E0-000393875BF8@laudatio.com> Message-ID: <20030930222158.GF17907@zsi.at> Hi! On Wed, Oct 01, 2003 at 12:18:41AM +0200, Florian Helmberger wrote: > Erm, Marcel hat recht gute Kontakte zu London.pm (http://london.pm.org), > die haben auch einen sehr aktiven IRC-Channel auf einem eigenen Server > (glaube ich), da koennte man sicher was machen denke ich. Seit heute haenge ich (hie und da) (grossteils alleine) auf irc.perl.org #austria.pm rum. irc.perl.org ist (anscheinend, aber ich bin nicht so der IRC-checker) ein Netzwerk von einigen IRC-Servern. #london.pm und #perl gibts dort auch, wo ich auch hie und da anzutreffen bin. -- #!/usr/bin/perl http://domm.zsi.at for(ref bless{},just'another'perl'hacker){s-:+-$"-g&&print$_.$/}